<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 避免IE使用兼容模式 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="renderer" content="webkit" />
<title>主页</title>

<link rel="stylesheet" type="text/css" href="../../../plugins/bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="../../../plugins/jquery-easyui/1.8.6/themes/bootstrap/easyui.css" />
<link rel="stylesheet" type="text/css" href="../../../plugins/jquery-easyui/1.8.6/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="../../../plugins/bootstrap/3.3.7/css/bootstrap-theme.min.css" />
<link rel="stylesheet"  href="../../../plugins/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="../../../plugins//toastr/2.1.4/toastr.min.css" />
    
<link rel="stylesheet" type="text/css" href="../../../plugins/select2/4.0.13/css/select2.min.css" />
    
<link rel="stylesheet" type="text/css" href="../../../plugins/codemirror/lib/codemirror.css" />
<link rel="stylesheet" type="text/css" href="../../../plugins/codemirror/theme/dracula.css" />
<link rel="stylesheet" type="text/css" href="../../../plugins/codemirror/addon/hint/show-hint.css" />
<link rel="stylesheet" type="text/css" href="../../../plugins/codemirror/addon/display/fullscreen.css">
<link rel="stylesheet" type="text/css" href="../../../plugins/codemirror/addon/dialog/dialog.css">
<link rel="stylesheet" type="text/css" href="../../../plugins/codemirror/addon/search/matchesonscrollbar.css">
    
<link rel="stylesheet" href="../../../plugins/zTree_v3/css/zTreeStyle/zTreeStyle.css" media="all" />

<link rel="stylesheet" type="text/css" href="../../../css/zbootstrap.css" />
<link rel="stylesheet" type="text/css" href="../../../css/zeasyui.css" />
<link rel="stylesheet" type="text/css" href="../../../css/common.css" /> 

<!-- 自定义实现css -->
<link rel="stylesheet" href="../../../js/codemirror/sqlquery.css" />

<script type="text/javascript" src="../../../plugins/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="../../../plugins/jquery-rstorage/1.3.2/jquery.rStorage.min.js"></script>
<script type="text/javascript" src="../../../plugins/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../../plugins/jquery-easyui/1.8.6/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../../plugins/jquery-easyui/treegrid-dnd/treegrid-dnd.js"></script>
    
<script type="text/javascript" src="../../../plugins/art-template/template-web.js"></script>
    
    
<script type="text/javascript" src="../../../plugins/json-editor-master/dist/jsoneditor.js"></script>
<script type="text/javascript" src="../../../plugins/select2/4.0.13/js/select2.min.js"></script>
<script type="text/javascript" src="../../../plugins/clipboard/2.0.6/clipboard.min.js"></script>
<script type="text/javascript" src="../../../plugins/toastr/2.1.4/toastr.min.js"></script>
    
<script type="text/javascript" src="../../../plugins/zTree_v3/js/jquery.ztree.all.js"></script>
<script type="text/javascript" src="../../../plugins/zTree_v3/js/jquery.ztree.exhide.js"></script>
<script type="text/javascript" src="../../../plugins/zTree_v3/js/fuzzysearch.js"></script>
    
<script type="text/javascript" src="../../../plugins/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/clike/clike.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/xml/xml.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/css/css.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/sass/sass.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/vue/vue.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/go/go.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/python/python.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/yaml/yaml.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/javascript/javascript.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/hint/xml-hint.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/hint/html-hint.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/hint/css-hint.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/hint/javascript-hint.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/search/searchcursor.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/search/search.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/scroll/annotatescrollbar.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/search/matchesonscrollbar.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/search/jump-to-line.js"></script> 

<script type="text/javascript" src="../../../plugins/codemirror/addon/hint/show-hint.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/selection/selection-pointer.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/display/autorefresh.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/display/placeholder.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/display/fullscreen.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/edit/matchbrackets.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/hint/anyword-hint.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/edit/closetag.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/edit/matchtags.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/fold/xml-fold.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/fold/comment-fold.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/comment/continuecomment.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/comment/comment.js"></script>
<script type="text/javascript" src="../../../plugins/codemirror/addon/dialog/dialog.js"></script>


<!-- 自定义实现JS-->
<script type="text/javascript" src="../../../js/codemirror/mybatis.js"></script>
<script type="text/javascript" src="../../../js/codemirror/mybatis-hint.js"></script>
<script type="text/javascript" src="../../../js/codemirror/mybatissql.js"></script>
<script type="text/javascript" src="../../../js/codemirror/mybatissql-hint.js"></script>


<script type="text/javascript" src="../../../js/zGlobal.js"></script>
<script type="text/javascript" src="../../../js/zApi.js"></script>
<script type="text/javascript" src="../../../js/zUtil.js"></script>
<script type="text/javascript" src="../../../js/zAlert.js"></script>
<script type="text/javascript" src="../../../js/zDict.js"></script>
<script type="text/javascript" src="../../../js/zTable.js"></script>
<script type="text/javascript" src="../../../js/zDialog.js"></script>
<script type="text/javascript" src="../../../js/zForm.js"></script>
<script type="text/javascript" src="../../../js/zJson.js"></script>
<script type="text/javascript" src="cfgGenerateIndex.js"></script>
    
    <![if IE]>

    <![endif]>

</head>
<style>
.ztree-btn-group{
    float: right;
    display: none;
}
.ztree-opr-btn{
    height: 15px;
    width: 15px;
    line-height: 0;
    margin-left: 5px;
    margin-right: 5px;
    padding: 0;
    display: inline;
    font-size: 10px;
}
.ztree li {
    position: relative;
}
.ztree li a:hover > .ztree-btn-group {
    display: block;
}
#dlg-use-path table td{
   white-space: nowrap;
}
#dlg-use-path table{
  max-width: unset;
  width: auto;
}
label[cpt-id].cpt-selected{
   color: #F3506F;
}
label[cpt-id]{
   cursor: pointer;
}
label[cpt-id]:hover{
   color: #5071EF;
}
#dlg-method-entity-edit fieldset:hover,#dlg-method-entity-view-edit fieldset:hover {
  cursor: pointer;
}

.column-hidden-val{
  display: none;
}

.column-show-tip {
  position: fixed;
  display: unset !important;
  border: 2px solid #EEE;
  border-radius: 5px;
  padding: 5px;
  color: white;
  text-align: center;
  pointer-events: none;
  min-width: 100px;
  max-width: 200px;
  background: #787878;
}
li .tree-node .entity-tree-field-btn {
  display: none;
}
li .tree-node:hover .entity-tree-field-btn {
  display: block;
  float: right;
}
li .tree-node-selected:hover .entity-tree-field-btn {
  color: #A6FF5C;
}
</style>
<body onload="noright(document.body);">

    <div id="p-all" class="easyui-layout" data-options="fit:true,border:false," style="border: 0px solid #D8D9E5;"> 
     <div data-options="region:'center',split:false,border:false,minWidth:200" style="overflow: hidden;width:50%;border-right:1px solid rgb(210, 208, 208);"> 
       <div style="height: 36px;padding:5px 3px;position: absolute;z-index: 2;right: 2px;">
        <input id="table-toggle" class="easyui-switchbutton" style="" />
       </div> 
      <table id="table-left"></table> 
     </div> 
     <div data-options="region:'east',split:true,border:false,minWidth:200" style="overflow: hidden;width:50%;border-left:1px solid rgb(210, 208, 208);"> 
      <table id="table-right"></table> 
     </div> 
    </div> 

  <!---分割-------------------------------------------------------------------------------->
  <div id="dlg-add-left" style="display:none;"> 
   <div class="main-content"> 
    <form>
     <div class="row">&nbsp;</div>
     <div class="row padding-right"> 
     <div class="col-sm-12"> 
          <div class="row" style="padding: 3px;"> 
           <fieldset style="border: 1px solid #e5e5e5;padding-bottom: 5px;"> 
              <legend class=" text-info">说明</legend>
              <span class="description-text">创建项目并解析表结构、上传模板文件后开始配置。下方“基础定义”配置了可以在后续明细配置中使用</span>
           </fieldset>
          </div> 
     </div>
     <div class="col-sm-6"> 
      <label class="form-lable">所属项目</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="projectId" name="projectId" data-options="required:true" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">所属模块</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="moduleId" name="moduleId" data-options="required:true" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">模板</label> 
      <div class="input-block"> 
        <input class="easyui-combobox" id="templateId" name="templateId" data-options="required:true" style="width:100%;" />
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">标题</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="cfgGenerateTitle" name="cfgGenerateTitle" data-options="required:true" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">预览模板</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="cfgTemplateId" name="cfgTemplateId" data-options="prompt:'为空时默认按优先级查找'" style="width:100%;" ></select>
      </div> 
     </div>
     <div class="col-sm-6"> 
      <label class="form-lable">排序</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="orderNum" name="orderNum" data-options="validType : ['number']" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">备注</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="remarks" name="remarks" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">模块属性扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="attrExtendModule" name="attrExtendModule" data-options="multiline:true,height:80" style="width:100%;" />
     </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">字段属性扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="attrExtendField" name="attrExtendField" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">属性扩展</label> 
      <div class="input-block"> 
        <div style="" id="attrExtendField_btn">
          <a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgJeditor('LA1')">基础定义</a>
          <span style="color: blue;">这里配置好，新增明细时就可以直接用；也可在明细中单独配置</span>
        </div>
      </div> 
     </div> 
     </div> 
     <div class="row">&nbsp;</div>
    </form> 
   </div> 
  </div>


  <div id="dlg-edit-left" style="display:none;"> 
   <div class="main-content"> 
    <form>
     <div class="row">&nbsp;</div>
     <div class="row padding-right"> 
     <div class="col-sm-6"> 
      <label class="form-lable">配置主键ID</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="cfgGenerateId" name="cfgGenerateId" data-options="required:true" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">所属项目</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="projectId" name="projectId" data-options="required:true" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">所属模块</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="moduleId" name="moduleId" data-options="required:true" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">模板</label> 
      <div class="input-block"> 
        <input class="easyui-combobox" id="templateId" name="templateId" data-options="required:true" style="width:100%;" />
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">标题</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="cfgGenerateTitle" name="cfgGenerateTitle" data-options="required:true" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">预览模板</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="cfgTemplateId" name="cfgTemplateId" data-options="prompt:'为空时默认按优先级查找'" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">排序</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="orderNum" name="orderNum" data-options="validType : ['number']" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">备注</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="remarks" name="remarks" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">输出目录</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="cfgGeneratePath" name="cfgGeneratePath" data-options="required:true" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">模块属性扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="attrExtendModule" name="attrExtendModule" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">字段属性扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="attrExtendField" name="attrExtendField" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">属性扩展</label> 
      <div class="input-block"> 
        <div style="" id="attrExtendField_btn">
          <a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgJeditor('LE1')">基础定义</a>
          <span style="color: blue;">这里配置的，新增明细时会带过去；也可在明细中直接配置</span>
        </div>
      </div> 
     </div>
     <div class="col-sm-6"> 
      <label class="form-lable">状态</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="dataStatus" name="dataStatus" data-options="" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">创建用户ID</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="createOprid" name="createOprid" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">创建用户</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="createName" name="createName" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">创建时间</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="createTm" name="createTm" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">更新用户ID</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="lastUpdOprid" name="lastUpdOprid" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">更新用户</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="lastUpdName" name="lastUpdName" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">更新时间</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="lastUpdTm" name="lastUpdTm" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     </div> 
     <div class="row">&nbsp;</div>
    </form> 
   </div> 
  </div>

  <div id="dlg-query-left" style="display:none;">
   <div class="main-content">
    <form>
    <div class="row">&nbsp;</div>
     <div class="row padding-right">
     <div class="col-sm-12"> 
      <label class="form-lable">所属项目</label> 
      <div class="input-block">
        <select class="easyui-combobox" id="projectId" name="projectId" data-options="" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">所属模块</label> 
      <div class="input-block">
        <select class="easyui-combobox" id="moduleId" name="moduleId" data-options="" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">配置主键ID</label> 
      <div class="input-block">
        <input class="easyui-textbox" id="cfgGenerateId" name="cfgGenerateId" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">标题</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="cfgGenerateTitle" name="cfgGenerateTitle" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     </div> 
     <div class="row">&nbsp;</div>
    </form>
   </div>
  </div>
  <!---分割-------------------------------------------------------------------------------->
  <div id="dlg-add-right" style="display:none;">
   <div class="main-content"> 
    <form>
     <div class="row">&nbsp;</div>
     <div class="row padding-right"> 
     <div class="col-sm-12"> 
          <div class="row" style="padding: 3px;"> 
           <fieldset style="border: 1px solid #e5e5e5;padding-bottom: 5px;"> 
              <legend class=" text-info">说明</legend>
              <span class="description-text">先填写基础信息，再配置“基础定义”（包含方法、表接口、属性定义等。记得保存），然后进入“代码生成设计”。</span>
              <br>
              <span class="description-text">填写完成后保存，返回列表使用<i class="fa fa-eye" style="color: blue;">生成代码</i>和<i class="fa fa-cloud-download" style="color: blue;">下载代码</i>。</span>
              <br>
              <span class="description-text"><i class="fa fa-eye" style="color: blue;">联动代码生成</i>:联动多个生成配置，使其参数互通，以便于支持多表操作的复杂功能（当然得写模板）。</span>
           </fieldset>
          </div> 
     </div>
     <div class="col-sm-6"> 
      <label class="form-lable">配置ID</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="cfgGenerateId" name="cfgGenerateId" data-options="" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">配置明细ID</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="cfgGenerateDtlId" name="cfgGenerateDtlId" data-options="" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-6"> 
      <label class="form-lable">生成类型</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="generateType" name="generateType" data-options="required:true,panelHeight:70,prompt:'单表生成选[独立]，多表联动选[联动]'" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">功能模块路径</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="outputModulePath" name="outputModulePath" data-options="required:true,validType : ['packagePath'],prompt:'例如：test，user.test...'" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">功能模块名称</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="moduleKeyName" name="moduleKeyName" data-options="required:true,prompt:'例如：测试功能。一次生成多个单表功能时：用逗号分隔,与表顺序数量一致',multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">功能模块编码</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="moduleKey" name="moduleKey" data-options="required:true,validType : ['letterModule'],prompt:'例如：test。一次生成多个单表功能时：用逗号分隔,与表顺序数量一致',multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">排序</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="orderNum" name="orderNum" data-options="validType : ['number']" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">排除模板</label> 
      <div class="input-block"> 
        <input class="easyui-combogrid" id="excludeTemplateIds" name="excludeTemplateIds" data-options="multiple:true,prompt:'排除不需要的模板'" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">方法扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="functionKey" name="functionKey" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">模块属性扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="attrExtendModule" name="attrExtendModule" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">字段属性扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="attrExtendField" name="attrExtendField" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">数据库接口扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="tableInterface" name="tableInterface" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">代码生成信息</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="configContent" name="configContent" data-options="multiline:true,height:80,prompt:'代码生成配置JSON，使用【代码生成设计】编辑'" style="width:100%;" /> 
        <div style="padding: 2px 0;" id="configContent_btn">
          <a href="javascript:void(0)" class="easyui-linkbutton" id="configContent_btnJeditor" onclick="dlgJeditor('RA1')" style="color: coral;">基础定义</a>
          <a href="javascript:void(0)" class="easyui-linkbutton" id="configContent_btnConfig" onclick="dlgConfig('RA1')" style="color: blue;">代码生成设计</a>
          <span style="color: red;">基础信息和"基础定义"完成后，点击这里</span>
        </div>
      </div> 
     </div> 
     </div> 
     <div class="row">&nbsp;</div>
    </form> 
   </div> 
  </div>
  
  <div id="dlg-edit-right" style="display:none;">
   <div class="main-content"> 
    <form>
     <div class="row">&nbsp;</div>
     <div class="row padding-right"> 
     <div class="col-sm-6"> 
      <label class="form-lable">配置ID</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="cfgGenerateId" name="cfgGenerateId" data-options="" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">配置明细ID</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="cfgGenerateDtlId" name="cfgGenerateDtlId" data-options="required:true" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">生成类型</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="generateType" name="generateType" data-options="required:true,panelHeight:70" style="width:100%;" ></select>
      </div> 
     </div> 
      <div class="col-sm-6"> 
      <label class="form-lable">功能模块路径</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="outputModulePath" name="outputModulePath" data-options="required:true,validType : ['packagePath'],prompt:'例如：test，user.test...'" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">功能模块名称</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="moduleKeyName" name="moduleKeyName" data-options="required:true,multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">功能模块编码</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="moduleKey" name="moduleKey" data-options="required:true,validType : ['letterModule'],prompt:'例如：test',multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">排序</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="orderNum" name="orderNum" data-options="validType : ['number']" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">排除模板</label> 
      <div class="input-block"> 
        <input class="easyui-combogrid" id="excludeTemplateIds" name="excludeTemplateIds" data-options="multiple:true,prompt:'排除不需要的模板'" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">方法扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="functionKey" name="functionKey" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">模块属性扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="attrExtendModule" name="attrExtendModule" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">字段属性扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="attrExtendField" name="attrExtendField" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12 hidden"> 
      <label class="form-lable">数据库接口扩展</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="tableInterface" name="tableInterface" data-options="multiline:true,height:80" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">代码生成信息</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="configContent" name="configContent" data-options="multiline:true,height:80,prompt:'代码生成配置JSON，使用【代码生成设计】编辑'" style="width:100%;" /> 
        <div style="padding: 2px 0;" id="configContent_btn">
          <a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgJeditor('RE1')"  style="color: coral;">基础定义</a>
          <a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgConfigReplace('RE1')" style="color: red;">替换关键字</a>
<!--           <a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgConfigJsonView('RE1')">JSON视图</a> -->
          <a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgConfig('RE1')"  style="color: blue;">代码生成设计</a>
          <span style="color: red;">基础信息和"基础定义"完成后，点击这里</span>
        </div>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">状态</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="dataStatus" name="dataStatus" data-options="" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">创建用户ID</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="createOprid" name="createOprid" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">创建用户</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="createName" name="createName" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">创建时间</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="createTm" name="createTm" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">更新用户ID</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="lastUpdOprid" name="lastUpdOprid" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">更新用户</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="lastUpdName" name="lastUpdName" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-6"> 
      <label class="form-lable">更新时间</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="lastUpdTm" name="lastUpdTm" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     </div> 
     <div class="row">&nbsp;</div>
    </form> 
   </div> 
  </div>
  
  <div id="dlg-query-right" style="display:none;">
   <div class="main-content">
    <form>
     <div class="row">&nbsp;</div>
     <div class="row padding-right">
     <div class="col-sm-12"> 
      <label class="form-lable">配置ID</label> 
      <div class="input-block">
        <select class="easyui-combobox" id="cfgGenerateId" name="cfgGenerateId" data-options="" style="width:100%;" ></select>
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">配置明细ID</label> 
      <div class="input-block">
        <input class="easyui-textbox" id="cfgGenerateDtlId" name="cfgGenerateDtlId" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">模块名称</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="moduleKeyName" name="moduleKeyName" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     <div class="col-sm-12"> 
      <label class="form-lable">模块编码</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="moduleKey" name="moduleKey" data-options="" style="width:100%;" /> 
      </div> 
     </div> 
     </div> 
     <div class="row">&nbsp;</div>
    </form>
   </div>
  </div>

  <div id="dlg-jeditor" style="display:none;">
   <div class="main-content">
    <div class="col-sm-12">
       <fieldset style="border: 1px solid #e5e5e5;padding-bottom: 5px;"> 
          <legend class=" text-info">说明</legend>
              <div><span class="text-danger">#、用于自定义参数，固定参数和自定义参数均可在代码模板中使用。
       </span></div>
       <div><span class="text-info">#、输入类型(type)为单选/多选时：选项来源需为数组格式[]，可配置静态数据或URL请求
       <br>&nbsp;&nbsp;静态数据格式：[{"text":"","value":""},...]；
       url数据格式：静态格式 、或 {resData/data/body:[静态格式]}、或{resData/data/body:{data:[静态格式]}}
       </span></div>
       <div><span class="text-info">#、输入类型(type)为布尔时：否=0,是=1
       </span></div>
      </fieldset>
       
       <div id="jsonedit_JSON" class="jsonedit" style="padding: 5px 0;"></div>
    </div>
   </div>
  </div>

 <div id="dlg-config" style="display:none;position: relative;">
   <div class="template-show" style="position: absolute;z-index: 1;right:10px;padding: 2px;">
          <a href="javascript:void(0)" class="easyui-linkbutton" id="table-config-template-show-btn3">动态参数</a>
   </div>
   <div id="dlg-config-tabs"  data-options="fit:true" >
    <div id="dlg-config-t1" title="基础配置" data-options="fit:true,border:false"> 
      <div class="easyui-layout" data-options="fit:true,border:false">
       <div class="no-tip" data-options="region:'west',split:true,border:false,title:'模块配置',minWidth:350,expandMode:'dock',hideCollapsedContent:false" style="overflow: hidden;width:350px;border-right:1px solid rgb(210, 208, 208);"> 
        <table id="table-config-main"></table>
       </div>
       <div class="no-tip" data-options="region:'center',border:false,title:'方法配置',expandMode:'dock',minWidth:400" style="overflow: hidden;width:auto;border-left:1px solid rgb(210, 208, 208);"> 
        <table id="table-config-method"></table> 
       </div>
      </div>
    </div>
    <div id="dlg-config-t2" title="表配置"  data-options="fit:true,border:false"> 
      <div class="easyui-layout" data-options="fit:true,border:false">
       <div class="no-tip"data-options="region:'west',split:true,border:false,title:'主子表关系配置',expandMode:'dock',minWidth:200,hideCollapsedContent:false,collapsed:true" style="overflow: hidden;width:20%;"> 
          <div id="table-table-rel-toolbar" style="padding:3px;height:auto">
            <div>
              <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt1">选择</a>
            </div>
            </div>
          <div style="height:100%;"><table id="table-config-tbl-rel"></table></div>
       </div>
       <div class="no-tip"data-options="region:'center',split:true,border:false,title:'表',minWidth:400" style="overflow: hidden;width:50%;"> 
          <div style="height:100%;"><table id="table-config-tbl"></table></div>
       </div>
       <div class="no-tip" data-options="region:'east',split:true,border:false,title:'字段/SQL内容',expandMode:'dock',minWidth:350,hideCollapsedContent:false" style="overflow: hidden;width:35%;"> 
       
       <div id="table-accordion" class="easyui-accordion" data-options="fit:true,multiple:false">
        <div title="表"  data-options="" style="padding:10px;">
           <div id="table-table-data-toolbar" style="padding:3px;height:auto">
            <div>
            <input id="tableAlias" data-options="required:true,prompt:'表别名,例t1,t2...'" class="easyui-textbox" style="width:250px" />
              <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt1">快捷选择</a>
            </div>
            </div>
            <div style="height:calc(100% - 40px);position: relative;border: 1px solid #D2D2D2;">
                <textarea id="tableData" name="tableData" style="display:none;"></textarea>
            </div>
        </div>
        <div title="字段" data-options="" style="">
          <div id="table-table-entity-toolbar" style="padding:3px;height:auto">
          <div>
            <input id="tableAlias" data-options="required:true,prompt:'表别名,例t1,t2...'" class="easyui-textbox" style="width:250px" />
            <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt1">添加</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt2">删除数据</a>
          </div>
          </div>
          <table id="table-table-entity" listlevel="entityData" style=""></table>
        </div>
        <div title="条件" data-options="" style="">
          <div id="table-table-where-toolbar" style="padding:3px;height:auto">
          <div>
            <input id="tableAlias" data-options="required:true,prompt:'表别名,例t1,t2...'" class="easyui-textbox"  style="width:250px" />
            <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt1">添加</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt2">删除数据</a>
          </div>
          </div>
          <table id="table-table-where" listlevel="whereData" style=""></table>
        </div>
       </div>
          
          
       </div>
      </div>
    </div>
    <div id="dlg-config-t3" title="模板配置" data-options="fit:true,border:false">
    <div class="easyui-layout" data-options="fit:true,border:false">
       <div class="no-tip" data-options="region:'center',border:false,title:'模板',minWidth:450" style="overflow: hidden;width:auto;"> 
        <table id="table-config-template"></table>
       </div>
       <div class="no-tip" data-options="region:'east',split:true,border:false,title:'批量修改',expandMode:'dock',minWidth:350,hideCollapsedContent:false" style="overflow: hidden;width:450px;border-left:1px solid rgb(210, 208, 208);"> 
         <div class="easyui-panel" data-options="fit:true,border:false,header:'#tt-config-template-detail',footer:'#tf-config-template-detail'">
        <div id="table-config-template-show" class="col-sm-12">
         <div class="col-sm-12">
            <div>&nbsp;</div>
        </div>
        <div class="hidden">
          <input class="easyui-textbox" id="templateId" name="templateId" data-options="label:'模板明细主键',labelWidth:'120',readonly:true" style="width:100%;" />
          <input class="easyui-textbox" id="templateFileId" name="templateFileId" data-options="label:'模板',labelWidth:'120',readonly:true" style="width:100%;" />
        </div>
        <div class="col-sm-12">
            <label class="form-lable">文件标题</label>
            <div class="input-block">
              <input class="easyui-textbox" id="fileTitle" name="fileTitle" data-options="readonly:true" style="width:100%;" />
            </div>
        </div>
        <div class="col-sm-12">
            <label class="form-lable">文件名称</label>
            <div class="input-block">
              <input class="easyui-textbox" id="fileName" name="fileName" data-options="readonly:true" style="width:100%;" />
            </div>
        </div>
        <div class="col-sm-12">
            <label class="form-lable">模板引用名</label>
            <div class="input-block">
              <input class="easyui-textbox" id="quoteTag" name="quoteTag" data-options="readonly:true" style="width:100%;" />
            </div>
        </div>
        <div class="col-sm-12">
            <label class="form-lable">输出文件格式</label>
            <div class="input-block">
              <input class="easyui-textbox" id="outputFileFormat" name="outputFileFormat" data-options="readonly:true" style="width:100%;" />
            </div>
        </div>
        <div id="table-config-template-show1">
         <div class="col-sm-12">
           <div style="text-align: left;background: #FFFD77;color: red;word-break: break-all;"><span name="wholePath"></span></div>
         </div>
        <div class="col-sm-12">
            <label class="form-lable"><span class="text-danger">输出基础路径</span></label>
            <div class="input-block">
              <input class="easyui-textbox" id="outputBasePath" name="outputBasePath" data-options="onChange:showWholePath" style="width:100%;" />
            </div>
        </div>
        <div class="col-sm-12">
            <label class="form-lable"><span class="text-danger">输出路径</span></label>
            <div class="input-block">
              <input class="easyui-textbox" id="outputPath" name="outputPath" data-options="onChange:showWholePath" style="width:100%;" />
            </div>
        </div>
        <div class="col-sm-12">
            <label class="form-lable"><span class="text-danger">输出文件名</span></label>
            <div class="input-block">
              <input class="easyui-textbox" id="outputFileName" name="outputFileName" data-options="onChange:showWholePath" style="width:100%;" />
            </div>
        </div>
        <div class="col-sm-12 hidden">
            <label class="form-lable"><span class="text-danger">引入文件路径</span></label>
            <div class="input-block">
              <input class="easyui-textbox" id="importFile" name="importFile" data-options="multiline:true,height:60" style="width:100%;" />
            </div>
        </div>
        <div class="col-sm-12">
            <label class="form-lable"><span class="text-danger">import类路径</span></label>
            <div class="input-block">
              <input class="easyui-textbox" id="importClazz" name="importClazz" data-options="multiline:true" style="width:100%;" />
            </div>
        </div>
        <div class="col-sm-12">
            <label class="form-lable"><span class="text-danger">resource类名</span></label>
            <div class="input-block">
              <input class="easyui-textbox" id="autowiredClazz" name="autowiredClazz" data-options="multiline:true" style="width:100%;" />
            </div>
        </div>
        <div class="col-sm-12">
            <label class="form-lable"><span class="text-danger">extends类名</span></label>
            <div class="input-block">
              <input class="easyui-textbox" id="extendClazz" name="extendClazz" data-options="" style="width:100%;" />
            </div>
        </div>
       </div>
       <div class="col-sm-12">
            <div style="height:80px;">&nbsp;</div>
       </div>
       </div>
      </div>
      <div id="tt-config-template-detail" class="text-center">
          <span class="text-danger">注意：标注的字段不为空都会更新,置空填写"NAN"</span>
       </div>
      <div id="tf-config-template-detail" class="text-center">
          <a href="javascript:void(0)" class="easyui-linkbutton" id="table-config-template-show-btn">清空</a> 
          <a href="javascript:void(0)" class="easyui-linkbutton" id="table-config-template-show-btn2">保存</a> 
       </div>
      </div>
    </div>
    </div>
    <div id="dlg-config-t4" title="对象配置"  data-options="fit:true,border:false"> 
      <div class="easyui-layout" data-options="fit:true,border:false">
       <div class="no-tip"data-options="region:'west',split:false,border:false,title:'方法',expandMode:'dock',hideCollapsedContent:false" style="overflow: hidden;width:300px;border-right:1px solid rgb(210, 208, 208);"> 
          <div class="overflow-y"><ul id="tree-main-method" style=""></ul></div>
          <div id="dlg-tree-method-entity-change" style="position: absolute;top: 0;right: 30px;text-align: right;color: red;">
                 模块<select class="easyui-combobox" id="tree-method-entity-change-btn" data-options="" style="width:170px;" ></select>
          </div>
       </div>
       <div class="no-tip" data-options="region:'center',split:false,border:false,title:'方法对象'" style="overflow: hidden;width:auto;border-left:1px solid rgb(210, 208, 208);"> 
          <table id="table-tree-method-entity" style=""></table>
       </div>
      </div>
    </div>
    
   </div>
  </div>

  <div id="dlg-use-path" style="display:none;overflow: hidden;">
      <div id="dlg-use-path-tabs" class="easyui-tabs" style="height: 100%;overflow: hidden;">
        <div title="模板路径变量" style="height: 100%;overflow: hidden;padding:5px;">
         <div style="height: 100%;overflow: auto;">
         <table id="table1" class="table table-condensed">
          <tbody></tbody>
         </table>
         </div>
        </div>
        <div title="变量使用说明" data-options="headerCls:'btn-info'" style="height: 100%;overflow: hidden;padding:5px;color: red;">
         <div style="height: 100%;overflow: auto;">
         <table id="table4" class="table table-condensed">
          <tbody></tbody>
         </table>
         </div>
        </div>
        <div title="模板变量" style="height: 100%;overflow: hidden;padding:5px;">
         <div style="height: 100%;overflow: auto;">
         <table id="table6" class="table table-condensed">
          <tbody></tbody>
         </table>
         </div>
        </div>
        <div title="JAVA类" data-options="headerCls:'btn-info'" style="height: 100%;overflow: hidden;padding:5px;">
         <div style="height: 100%;overflow: auto;">
         <table id="table5" class="table table-condensed">
          <tbody></tbody>
         </table>
         </div>
        </div>
      </div>
  </div>
  
  <div id="dlg-select-table-rel" style="display:none;overflow: hidden;">
   <div class="main-content">
      <div class="easyui-layout" data-options="fit:true,border:false">
       <div class="no-tip"data-options="region:'west',split:true,border:false,title:'主表(当前选中表)'" style="overflow: hidden;width:50%;border-right:1px solid rgb(210, 208, 208);"> 
          <table id="table-rel-colunms-left"></table>
       </div>
       <div class="no-tip" data-options="region:'center',split:false,border:false,title:'子表'" style="overflow: hidden;width:auto;border-left:1px solid rgb(210, 208, 208);"> 
          <div id="table-rel-toolbar-right" style="padding:5px;height:auto">
          <div>
            <select class="easyui-combobox" id="tableCode" name="tableCode" data-options="required:true" style="width:300px;" ></select>
          </div>
          </div>
          <table id="table-rel-colunms-right"></table>
       </div>
      </div>
   </div>
  </div>
  
  <div id="dlg-select-table-cols" style="display:none;overflow: hidden;">
   <div class="main-content">
      <div  style="height: 100%; overflow: auto;" > 
        <div id="table-colunms-toolbar" style="padding:5px;height:auto">
        <div>
            <span>表编码 </span><input id="tableCode" name="tableCode" class="easyui-textbox" data-options="prompt:'模糊查询'" style="width:200px" />
            <span>标签 </span><input name="tableTag" class="easyui-textbox" data-options="prompt:'模糊查询'" style="width:200px" />
            <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt1">查询</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt2">清空选中</a>
        </div>
        </div>
        <table id="table-colunms"></table>
       </div> 
   </div>
  </div>
  <div id="dlg-select-table-info" style="display:none;overflow: hidden;">
   <div class="main-content">
      <div  style="height: 100%; overflow: auto;" > 
        <div id="table-info-toolbar" style="padding:5px;height:auto">
        <div>
            <span>表编码 </span><input id="tableCode" name="tableCode" class="easyui-textbox" data-options="prompt:'模糊查询'" style="width:200px" />
            <span>标签 </span><input name="tableTag" class="easyui-textbox" data-options="prompt:'模糊查询'" style="width:200px" />
            <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt1">查询</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" id="toolbar-bt2">清空选中</a>
        </div>
        </div>
        <table id="table-info"></table>
       </div> 
   </div>
  </div>

  <div id="dlg-method-entity-input-opts" style="display:none;overflow: hidden;">
      <div class="col-sm-12 overflow-y">
        <div id="jsonedit_JSON" class="jsonedit" style="padding: 5px 0;"></div>
      </div>
  </div>
  <div id="dlg-method-entity-json1" style="display:none;overflow: hidden;">
      <div style="height:25px;"><span>用于拷贝当前模块对象到其它模块</span></div>
        <div style="height:calc(100% - 26px);position: relative;border: 1px solid #D2D2D2;">
           <textarea id="fieldJson"></textarea>
        </div>
  </div>
  <div id="dlg-method-entity-json2" style="display:none;overflow: hidden;">
      <div style="height:25px;"><span>用于拷贝其它模块对象到当前模块</span></div>
        <div style="height:calc(100% - 26px);position: relative;border: 1px solid #D2D2D2;">
           <textarea id="fieldJson"></textarea>
        </div>
  </div>

  <div id="dlg-code-online-look" style="display:none;overflow: hidden;">
   <div class="main-content">
     <div class="easyui-layout" data-options="fit:true,border:false">
       <div class="no-tip"data-options="region:'west',split:true,border:false,title:'代码文件',expandMode:'dock'" style="overflow: hidden;width:400px;border-right:1px solid rgb(210, 208, 208);z-index: 5;"> 
          <div class="overflow-y"><ul id="tree-code-file" class="ztree"></ul></div>
       </div>
       <div class="no-tip" data-options="region:'center',split:false,border:false,title:'文件内容'" style="overflow: hidden;width:auto;border-left:1px solid rgb(210, 208, 208);"> 
          <div style="height:100%;position: relative;border: 1px solid #D2D2D2;">
           <textarea id="fileContent" style="display: none;"></textarea>
          </div>
       </div>
      </div>
   </div>
  </div>
  
  <div id="dlg-config-replace" style="display:none;overflow: hidden;">
   <div class="main-content">
     <div class="col-sm-12"> 
      <label class="form-lable">替换模式</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="replaceType" name="replaceType" data-options="required:true,panelHeight:80,data:[{text:'字符',value:'1'},{text:'正则',value:'2'}]" style="width:100%;" ></select>
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">整个单词</label> 
      <div class="input-block"> 
        <select class="easyui-combobox" id="wholeWord" name="wholeWord" data-options="required:true,panelHeight:80,data:[{text:'否',value:'0'},{text:'是',value:'1'}]" style="width:100%;" ></select>
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">待替换关键字</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="oldstr" name="oldstr" data-options="required:true," style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">替换为</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" id="newstr" name="newstr" data-options="required:true,prompt:'置空填 NAN'" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12" style="color:red;"> 
                注意：替换之后进入配置查看，防止异常；
     </div>
   </div>
  </div>
<!--   新增方法定义 -->
  <div id="dlg-add-method" style="display:none;overflow: hidden;">
   <div class="main-content">
     <div class="col-sm-12"> 
      <label class="form-lable">标题</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" name="title" data-options="required:true,prompt:'例如：查询'" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">唯一编码</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" name="key" data-options="required:true,validType : ['letterNum'],prompt:'例如：query'" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">链接</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" name="url" data-options="required:true,prompt:'例如：/{B_methodKey}'" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">编码1</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" name="code1" data-options="" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">编码2</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" name="code2" data-options="" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">编码3</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" name="code3" data-options="" style="width:100%;" /> 
      </div> 
     </div>
   </div>
  </div>

<!--   新增SQL定义 -->
  <div id="dlg-add-sqlinterface" style="display:none;overflow: hidden;">
   <div class="main-content">
     <div class="col-sm-12"> 
      <label class="form-lable">标题</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" name="title" data-options="required:true,prompt:'例如：查询集合'" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">唯一编码</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" name="key" data-options="required:true,validType : ['letterNum'],prompt:'例如：selectList'" style="width:100%;" /> 
      </div> 
     </div>
     <div class="col-sm-12"> 
      <label class="form-lable">命名编码</label> 
      <div class="input-block"> 
        <input class="easyui-textbox" name="code" data-options="required:true,validType : ['letterNum'],prompt:'例如：selectList'" style="width:100%;" /> 
      </div> 
     </div>
   </div>
  </div>

 <!--  获取已配置过的模板 -->
  <div id="dlg-select-cfgtemplate" style="display:none;overflow: hidden;">
       <div  style="height: 100%; overflow: auto;" > 
        <div id="table-cfgtemplate-toolbar" style="padding:5px;height:auto">
        <div>
            <span>模块名称 </span><input id="moduleKeyName" name="moduleKeyName" class="easyui-textbox" data-options="prompt:'模糊查询'" style="width:200px" />
            <span>模块编码</span><input id="moduleKey" name="moduleKey" class="easyui-textbox" data-options="prompt:'模糊查询'" style="width:200px" />
            <a href="javascript:void(0);" class="easyui-linkbutton" onclick="configForTemplateTableCfgtemplateRefresh();">查询</a>
            <div><span style="color: red;">一般选择同一套模板，自动填充引用编码相同的模板配置</span></div>
        </div>
        </div>
        <table id="table-cfgtemplate"></table> 
       </div> 
  </div>
  
   <!--  校验规则选择 -->
  <div id="dlg-select-checkBackground" style="display:none;overflow: hidden;">
       <div  style="height: 100%;" > 
        <div id="table-checkBackground-toolbar" style="padding:5px;height:auto">
            <div><span style="color: red;">覆盖模式：会替换现有全部校验规则字段</span></div>
        </div>
        <table id="table-checkBackground"></table> 
       </div> 
  </div>

   <!--  模板选择 -->
  <div id="dlg-select-template-list" style="display:none;overflow: hidden;">
       <div  style="height: 100%;" > 
        <div id="table-select-template-list-toolbar" style="padding:5px;height:auto">
            <div>
            <span>项目 </span><input id="projectId" name="projectId" class="easyui-combobox" style="width:150px" />
            <span>模块</span><input id="moduleId" name="moduleId" class="easyui-combobox" style="width:150px" />
            <span>模板</span><input name="templateTitle" class="easyui-textbox" data-options="prompt:'模糊查询'" style="width:150px" />
            <a href="javascript:void(0);" class="easyui-linkbutton" onclick="dlgSelectTemplateListRefresh();">查询</a>
            <div><span style="color: red;">选择合适的模板,模板中的属性都需在后续生成配置中赋值</span></div>
            </div>
        </div>
        <table id="table-select-template-list"></table> 
       </div> 
  </div>


  
  <div id="dlg-method-entity-edit" style="display:none;overflow: hidden;">
   <div class="easyui-panel" data-options="fit:true,border:false" >
     <form style="height: 100%;">
       <div id="tt-dlg-method-entity-edit"> 
          <span class="text-danger">注意：批量更新选中的不为空字段,置空填写"NAN" </span>
          <a href="javascript:void(0);"  class="btn btn-default" id="entity-attr-bt2" >清空选中项</a>
          <div style="float: right;">
            <span style="font-weight: bold;color: #234bea;">&nbsp;&nbsp;（注意）更新全部方法对象</span>
            <input id="update-allentity-toggle" class="easyui-switchbutton" data-options="checked:false" style="" />
          </div>
       </div>
      
      <div id="entity-attr" class="col-sm-8" style="height:100%;padding: 0;">
      <div class="easyui-panel" data-options="fit:true,header:'#tt-dlg-method-entity-edit'" style="border-left:1px solid rgb(210, 208, 208);border-right:1px solid rgb(210, 208, 208);"> 
      <div class="row">&nbsp;</div>
      <div class="col-sm-12"> 
          <div class="row" style="padding: 3px;"> 
           <fieldset style="border: 1px solid #e5e5e5;padding-bottom: 5px;"> 
              <legend class=" text-info">说明</legend>
              <span class="description-text">字段用途取决于模板中的写法，直接输出或作为判断标志</span>
           </fieldset>
          </div> 
     </div>
      <div class="col-sm-12"> 
          <div class="row"> 
           <fieldset title="折叠/展开" onclick="accordionEntityToggle(this,'A','#entity-base-info')"> 
              <legend class=" text-info" >基础属性
              <span class="accordion-collapse" style="font-size: 14px;">&nbsp;&nbsp;&nbsp;</span></legend> 
           </fieldset> 
          </div> 
          <input id="_uniqueId" name="_uniqueId" type="hidden" /> 
      </div> 
      <div class="col-sm-12" id="entity-base-info"> 
        <div class="col-sm-6"> 
          <label class="form-lable">字段标题
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_fieldTitle"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="fieldTitle" name="fieldTitle" data-options="required:true" style="width:100%;" /> 
          </div> 
         </div> 
         <div class="col-sm-6"> 
          <label class="form-lable">驼峰编码
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_fieldJavaCode"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="fieldJavaCode" name="fieldJavaCode" data-options="required:true" style="width:100%;" /> 
          </div> 
         </div> 
         <div class="col-sm-6"> 
          <label class="form-lable">驼峰编码2
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_fieldJavaCode2"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="fieldJavaCode2" name="fieldJavaCode2" data-options="" style="width:100%;" /> 
          </div> 
         </div> 
         <div class="col-sm-6"> 
          <label class="form-lable">字段编码
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_fieldCode"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="fieldCode" name="fieldCode" data-options="" style="width:100%;" /> 
          </div> 
         </div> 
         <div class="col-sm-6"> 
          <label class="form-lable">使用范围
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_fieldUseType"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-combobox" id="fieldUseType" name="fieldUseType" data-options="required:true,panelHeight:200" style="width:100%;" /> 
          </div> 
         </div> 
         <div class="col-sm-6"> 
              <label class="form-lable">字段类型
              <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_fieldType"/></div>
              </label> 
              <div class="input-block"> 
                <select class="easyui-combobox" id="fieldType" name="fieldType" data-options="required:true,panelHeight:150" style="width:100%;" ></select>
              </div> 
             </div> 
          <div class="col-sm-6"> 
              <label class="form-lable">加载模板
                <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_selectTemplate"/></div>
              </label> 
              <div class="input-block"> 
               <input class="easyui-combobox" id="selectTemplate" name="selectTemplate" data-options="prompt:'一般用于生成嵌套对象/集合',panelHeight:200" style="width:100%;" /> 
              </div> 
          </div>
      </div>
     <div class="col-sm-12"> 
          <div class="row"> 
           <fieldset title="折叠/展开" onclick="accordionEntityToggle(this,'A','#entity-page-info')"> 
              <legend class=" text-info">页面属性
              <span class="accordion-collapse" style="font-size: 14px;">&nbsp;&nbsp;&nbsp;</span></legend> 
           </fieldset> 
          </div> 
     </div>
     <div class="col-sm-12" id="entity-page-info">
        <div class="col-sm-6"> 
          <label class="form-lable">引用模块
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_useModuleCode"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="useModuleCode" name="useModuleCode" data-options="prompt:'复杂页面引用其他模块配置'" style="width:100%;" /> 
          </div> 
        </div>
        <div class="col-sm-6"> 
          <label class="form-lable">引用模块方法
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_useMethodCode"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="useMethodCode" name="useMethodCode" data-options="prompt:'复杂页面引用其他模块配置'" style="width:100%;" /> 
          </div> 
        </div>
        <div class="col-sm-6"> 
          <label class="form-lable">查询运算符
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_conditionSymbol"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="conditionSymbol" name="conditionSymbol" data-options="panelHeight:200,prompt:'一般用于分页查询条件'" style="width:100%;" /> 
          </div> 
        </div>
        <div class="col-sm-6"> 
          <label class="form-lable">组件类型
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_inputType"/></div>
          </label> 
          <div class="input-block"> 
            <select class="easyui-combobox" id="inputType" name="inputType" data-options="required:true" style="width:100%;" ></select>
            <input id="componentType" name="componentType" type="hidden" /> 
          </div> 
        </div>
        <div class="col-sm-6"> 
          <label class="form-lable">组件数量
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_inputNumber"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="inputNumber" name="inputNumber" data-options="" style="width:100%;" /> 
          </div> 
        </div>
        <div class="col-sm-6"> 
          <label class="form-lable">组件默认值
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_inputVal"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="inputVal" name="inputVal" data-options="" style="width:100%;" /> 
          </div> 
        </div> 
        <div class="col-sm-6"> 
              <label class="form-lable">栅格宽度
              <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_gridClonums"/></div>
              </label> 
              <div class="input-block"> 
                <input class="easyui-slider" id="gridClonums" name="gridClonums" data-options="required:true,value:6,min:1,max:24,step:1,rule:['',2,'',4,'',6,'',8,'',10,'',12,'',14,'',16,'',18,'',20,'',22,'',24]" style="width:100%;" />  
              </div> 
        </div>
        <div class="col-sm-6"> 
          <label class="form-lable">组件字典
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_inputDict"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="inputDict" name="inputDict" data-options="" style="width:100%;" /> 
          </div> 
        </div>
        <div class="col-sm-6"> 
          <label class="form-lable">组件样式
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_inputClass"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="inputClass" name="inputClass" data-options="" style="width:100%;" /> 
          </div> 
        </div>
        <div class="col-sm-6"> 
              <label class="form-lable">显示标志
              <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_pageShowFlag"/></div>
              </label> 
              <div class="input-block"> 
                <select class="easyui-combobox" id="pageShowFlag" name="pageShowFlag" data-options="required:true,panelHeight:70" style="width:100%;" ></select>
              </div> 
          </div>
          <div class="col-sm-6"> 
              <label class="form-lable">显示顺序
              <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_pageOrder"/></div>
              </label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="pageOrder" name="pageOrder" data-options="" style="width:100%;" /> 
              </div> 
          </div>
          <div class="col-sm-6"> 
              <label class="form-lable">是否只读
              <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_readonlyFlag"/></div>
              </label> 
              <div class="input-block"> 
                <input class="easyui-combobox" id="readonlyFlag" name="readonlyFlag" data-options="required:true,panelHeight:70" style="width:100%;" /> 
              </div> 
          </div>
          <div class="col-sm-6"> 
              <label class="form-lable">分组编码
              <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_groupCode"/></div>
              </label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="groupCode" name="groupCode" data-options="prompt:'便于字段分组展示,N表示无分组'" style="width:100%;" /> 
              </div> 
            </div> 
            <div class="col-sm-6"> 
              <label class="form-lable">分组名称
              <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_groupName"/></div>
              </label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="groupName" name="groupName" data-options="prompt:'便于字段分组展示'" style="width:100%;" /> 
              </div> 
            </div>
          
          <div class="col-sm-12"> 
          <label class="form-lable">组件options
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_inputOptions1"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="inputOptions1" name="inputOptions1" data-options="multiline:true,height:60,prompt:'使用【视图编辑】功能修改'" style="width:100%;" /> 
            <a href="javascript:void(0);"  class="btn btn-default btn-sm" id="inputOptions-bt1" >视图编辑</a>
            <span class="text-warning">标准JSON字符，手动修改后需要进入视图保存</span>
          </div> 
        </div> 
        <div class="col-sm-12 hidden"> 
          <label class="form-lable">组件最终options
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_inputOptions2"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="inputOptions2" name="inputOptions2" data-options="multiline:true,readonly:true,height:60,prompt:'无需直接修改，随配置JSON联动。JS中用的最终JSON'" style="width:100%;" /> 
          </div> 
          </div>
          <div class="col-sm-12 hidden"> 
          <label class="form-lable">组件options定义
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_inputOptions3"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="inputOptions3" name="inputOptions3" data-options="multiline:true,height:60,readonly:true,prompt:'无需直接修改，随配置JSON联动。属性定义JSON'" style="width:100%;" /> 
          </div> 
          </div>
     </div>
      <div class="col-sm-12"> 
          <div class="row"> 
           <fieldset title="折叠/展开" onclick="accordionEntityToggle(this,'A','#entity-java-info')"> 
              <legend class=" text-info">后台属性
              <span class="accordion-collapse" style="font-size: 14px;">&nbsp;&nbsp;&nbsp;</span></legend> 
           </fieldset> 
          </div> 
      </div>
      <div class="col-sm-12" id="entity-java-info"> 
         <div class="col-sm-6"> 
          <label class="form-lable">引用表编码
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_useTableCode"/></div>
          </label> 
          <div class="input-block"> 
            <select class="easyui-textbox" id="useTableCode" name="useTableCode" data-options="prompt:'要使用的表'" style="width:100%;" ></select>
          </div> 
         </div> 
         <div class="col-sm-6"> 
          <label class="form-lable">引用表SQL
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_useTableSqlCode"/></div>
          </label> 
          <div class="input-block"> 
            <select class="easyui-textbox" id="useTableSqlCode" name="useTableSqlCode" data-options="prompt:'要使用的表'" style="width:100%;" ></select>
          </div> 
         </div>
         <div class="col-sm-6"> 
          <label class="form-lable">是否标准类型
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_standardFlag"/></div>
          </label> 
          <div class="input-block"> 
            <select class="easyui-combobox" id="standardFlag" name="standardFlag" data-options="required:true,panelHeight:70" style="width:100%;" ></select>
          </div> 
         </div> 
         <div class="col-sm-6"> 
          <label class="form-lable">JAVA类型
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_javaType"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="javaType" name="javaType" data-options="" style="width:100%;" /> 
          </div> 
         </div> 
         <div class="col-sm-6"> 
          <label class="form-lable">JAVA类型(全)
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_javaFullType"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="javaFullType" name="javaFullType" data-options="" style="width:100%;" /> 
          </div> 
         </div> 
         <div class="col-sm-6"> 
          <label class="form-lable">JAVA扩展类型
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_javaVoType"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="javaVoType" name="javaVoType" data-options="" style="width:100%;" /> 
          </div> 
         </div>
         <div class="col-sm-6"> 
          <label class="form-lable">JDBC类型
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_jdbcType"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="jdbcType" name="jdbcType" data-options="" style="width:100%;" /> 
          </div> 
         </div> 
       </div>
     <div class="col-sm-12"> 
          <div class="row"> 
           <fieldset title="折叠/展开" 
              onclick="accordionEntityToggle(this,'A','#entity-check-info')"> 
              <legend class=" text-info">校验属性
              <span class="accordion-collapse" style="font-size: 14px;">&nbsp;&nbsp;&nbsp;</span></legend> 
           </fieldset> 
          </div> 
     </div> 
     <div class="col-sm-12" id="entity-check-info"> 
        <div class="col-sm-6"> 
          <label class="form-lable">是否必填
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_mustFlag"/></div>
          </label> 
          <div class="input-block"> 
            <select class="easyui-combobox" id="mustFlag" name="mustFlag" data-options="required:true,panelHeight:70" style="width:100%;" ></select>
          </div> 
        </div>
        <div class="col-sm-6"> 
          <label class="form-lable">校验类型
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_checkType"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-combobox" id="checkType" name="checkType" data-options="required:true,panelHeight:70" style="width:100%;" /> 
          </div> 
        </div>
        <div class="col-sm-12"> 
          <label class="form-lable">校验规则(后台)
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_checkBackground"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="checkBackground" name="checkBackground" data-options="multiline:true" style="width:100%;" /> 
          </div> 
        </div> 
        <div class="col-sm-12"> 
          <label class="form-lable">校验规则(页面)
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_checkPage"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="checkPage" name="checkPage" data-options="multiline:true" style="width:100%;" /> 
          </div> 
        </div> 
        <div class="col-sm-6"> 
          <label class="form-lable">最大值
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_maxValue"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="maxVal" name="maxVal" data-options="" style="width:100%;" /> 
          </div> 
        </div> 
        <div class="col-sm-6"> 
          <label class="form-lable">最小值
          <div style="position: absolute;top: 5px;right: 0;"><input class="easyui-checkbox js-check" id="CK_minValue"/></div>
          </label> 
          <div class="input-block"> 
            <input class="easyui-textbox" id="minVal" name="minVal" data-options="" style="width:100%;" /> 
          </div> 
        </div>
      </div>
         
         <div class="col-sm-12"> 
          <div class="row"> 
           <fieldset title="折叠/展开" onclick="accordionEntityToggle(this,'A','#entity-attr-ex')"> 
              <legend class=" text-info">扩展属性
               <span class="accordion-collapse" style="font-size: 14px;">&nbsp;&nbsp;&nbsp;</span></legend> 
           </fieldset> 
          </div> 
         </div> 
        <div id="entity-attr-ex" class="pull-left" style="width: 100%;">
            <!--  扩展字段 -->
        </div>
        <div class="col-sm-12"> 
          &nbsp;
         </div> 
         <div class="col-sm-12"> 
          &nbsp;
         </div> 
      </div>
      </div>
      <div id="entity-attr-other" class="col-sm-4" style="height:100%;padding: 0;">
      <div class="easyui-panel"  data-options="fit:true,header:'#tt-entity-attr-other'" style="border-left:1px solid rgb(210, 208, 208);border-right:1px solid rgb(210, 208, 208);"> 
         <ul id="tree-entity-attr" style=""></ul>
      </div>
              <div id="tt-entity-attr-other" style="font-size:13px;line-height: 25px;"> 批量
                <input class="easyui-radiobutton" id="batchFlag1" name="batchFlag" value="1" data-options="onChange: function() {dlgEntityAttrBatchSelectFlag('1');}" />否
                <input class="easyui-radiobutton" id="batchFlag2" name="batchFlag" value="2" data-options="onChange: function() {dlgEntityAttrBatchSelectFlag('2');}" />是
                <input class="easyui-radiobutton" id="batchFlag3" name="batchFlag" value="3" data-options="onChange: function() {dlgEntityAttrBatchSelectFlag('3');}" />含自身
                 &nbsp; &nbsp; 
                 <a href="javascript:void(0);"  class="btn btn-default" id="entity-attr-bt1" > 清空选择</a>
                 <a href="javascript:void(0);"  class="btn btn-default" id="entity-attr-bt3" >  保存结构</a>
              </div> 
      </div>
      
    </form>
   </div>
  </div>

<div id="dlg-method-entity-view-edit" style="display:none;overflow: hidden;">
  <form style="height:100%;">
    <div style="height:100%;display: flex;display: -webkit-flex; flex-direction: row;flex-wrap: wrap;">
       <div style="height:35px;line-height: 30px;white-space: nowrap;">
           <input id="tagKey" name="tagKey" type="hidden" />
           <select class="easyui-combobox" id="previewHtmlType" name="previewHtmlType" data-options="onChange:function(v1){configForMethodEntityViewChange(v1);}" style="width:300px;" ></select>
           <span class="text-info">用内部组件模拟外部实际的组件，方便直观的调整</span>
       </div>
       <div id="view-content" style="height: calc(100% - 35px);width: 65%;max-width:calc(100% - 370px);position: relative;border: 10px solid #D7DADE;padding: 15px;"> 
       </div>
       <div id="view-opr" style="height: calc(100% - 35px);width:35%;min-width:370px; position: relative;border: 1px solid #D7DADE;padding: 5px;overflow-x: hidden;">
          <div class="col-sm-12"> 
            <div class="row"> 
            <fieldset title="折叠/展开" onclick="accordionEntityToggle(this,'B','#entity-base-info')"> 
                <legend class=" text-info">基础属性
                  <span class="accordion-collapse" style="font-size: 14px;">&nbsp;&nbsp;&nbsp;</span></legend> 
            </fieldset> 
            </div> 
          </div> 
          
          <div class="col-sm-12" id="entity-base-info"> 
            <input id="uniqueId" name="uniqueId" type="hidden" style="width:100%;" /> 
            <div class="col-sm-12"> 
              <label class="form-lable">字段标题</label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="fieldTitle" name="fieldTitle" data-options="required:true" style="width:100%;" /> 
              </div> 
            </div> 
            <div class="col-sm-12"> 
              <label class="form-lable">驼峰编码</label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="fieldJavaCode" name="fieldJavaCode" data-options="required:true" style="width:100%;" /> 
              </div> 
            </div> 
            <div class="col-sm-12"> 
              <label class="form-lable">驼峰编码2</label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="fieldJavaCode2" name="fieldJavaCode2" data-options="" style="width:100%;" /> 
              </div> 
            </div> 
            <div class="col-sm-12"> 
              <label class="form-lable">字段编码</label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="fieldCode" name="fieldCode" data-options="" style="width:100%;" /> 
              </div> 
            </div>
            <div class="col-sm-12"> 
              <label class="form-lable">使用范围
              </label> 
              <div class="input-block"> 
                <input class="easyui-combobox" id="fieldUseType" name="fieldUseType" data-options="required:true,panelHeight:200" style="width:100%;" /> 
              </div> 
            </div> 
            <div class="col-sm-12"> 
              <label class="form-lable">字段类型
              </label> 
              <div class="input-block"> 
                <select class="easyui-combobox" id="fieldType" name="fieldType" data-options="required:true,panelHeight:150" style="width:100%;" ></select>
              </div> 
            </div> 
            <div class="col-sm-12"> 
              <label class="form-lable">加载模板
              </label> 
              <div class="input-block"> 
              <input class="easyui-combobox" id="selectTemplate" name="selectTemplate" data-options="prompt:'一般用于生成嵌套对象/集合',panelHeight:200" style="width:100%;" /> 
              </div> 
            </div>
          </div>
          
          <div class="col-sm-12"> 
                <div class="row"> 
                <fieldset title="折叠/展开" onclick="accordionEntityToggle(this,'B','#entity-page-info')"> 
                    <legend class=" text-info">页面属性
                      <span class="accordion-collapse" style="font-size: 14px;">&nbsp;&nbsp;&nbsp;</span></legend> 
                </fieldset> 
                </div> 
          </div>
          <div class="col-sm-12" id="entity-page-info"> 
              <div class="col-sm-12"> 
                <label class="form-lable">引用模块
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="useModuleCode" name="useModuleCode" data-options="prompt:'复杂页面引用其他模块配置'" style="width:100%;" /> 
                </div> 
              </div>
              <div class="col-sm-12"> 
                <label class="form-lable">引用模块方法
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="useMethodCode" name="useMethodCode" data-options="prompt:'复杂页面引用其他模块配置'" style="width:100%;" /> 
                </div> 
              </div>
              <div class="col-sm-12"> 
                <label class="form-lable">查询运算符
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="conditionSymbol" name="conditionSymbol" data-options="panelHeight:200,prompt:'一般用于分页查询条件'" style="width:100%;" /> 
                </div> 
              </div>
              <div class="col-sm-12"> 
                <label class="form-lable">组件类型
                </label> 
                <div class="input-block"> 
                  <select class="easyui-combobox" id="inputType" name="inputType" data-options="required:true" style="width:100%;" ></select>
                  <input id="componentType" name="componentType" type="hidden" /> 
                </div> 
              </div>
              <div class="col-sm-12"> 
                <label class="form-lable">组件数量
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="inputNumber" name="inputNumber" data-options="" style="width:100%;" /> 
                </div> 
              </div>
              <div class="col-sm-12"> 
                <label class="form-lable">组件默认值
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="inputVal" name="inputVal" data-options="" style="width:100%;" /> 
                </div> 
              </div> 
              <div class="col-sm-12"> 
                <label class="form-lable">栅格宽度
                </label> 
                <div class="input-block"> 
                  <input class="easyui-slider" id="gridClonums" name="gridClonums" data-options="required:true,value:6,min:1,max:24,step:1,rule:['',2,'',4,'',6,'',8,'',10,'',12,'',14,'',16,'',18,'',20,'',22,'',24]" style="width:100%;" />  
                </div> 
              </div>
              <div class="col-sm-12"> 
                <label class="form-lable">组件字典
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="inputDict" name="inputDict" data-options="" style="width:100%;" /> 
                </div> 
              </div>
              <div class="col-sm-12"> 
                <label class="form-lable">组件样式
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="inputClass" name="inputClass" data-options="" style="width:100%;" /> 
                </div> 
              </div>
              <div class="col-sm-12"> 
                    <label class="form-lable">显示标志
                    </label> 
                    <div class="input-block"> 
                      <select class="easyui-combobox" id="pageShowFlag" name="pageShowFlag" data-options="required:true,panelHeight:70" style="width:100%;" ></select>
                    </div> 
                </div>
                <div class="col-sm-12"> 
                    <label class="form-lable">显示顺序
                    </label> 
                    <div class="input-block"> 
                      <input class="easyui-textbox" id="pageOrder" name="pageOrder" data-options="" style="width:100%;" /> 
                    </div> 
                </div>
                <div class="col-sm-12"> 
                    <label class="form-lable">是否只读
                    </label> 
                    <div class="input-block"> 
                      <input class="easyui-combobox" id="readonlyFlag" name="readonlyFlag" data-options="required:true,panelHeight:70" style="width:100%;" /> 
                    </div> 
                </div>
                <div class="col-sm-12"> 
                    <label class="form-lable">分组编码
                    </label> 
                    <div class="input-block"> 
                      <input class="easyui-textbox" id="groupCode" name="groupCode" data-options="prompt:'便于字段分组展示,N表示无分组'" style="width:100%;" /> 
                    </div> 
                  </div> 
                  <div class="col-sm-12"> 
                    <label class="form-lable">分组名称
                    </label> 
                    <div class="input-block"> 
                      <input class="easyui-textbox" id="groupName" name="groupName" data-options="prompt:'便于字段分组展示'" style="width:100%;" /> 
                    </div> 
                  </div>
                
                <div class="col-sm-12"> 
                <label class="form-lable">组件options
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="inputOptions1" name="inputOptions1" data-options="multiline:true,height:60,prompt:'使用【视图编辑】功能修改'" style="width:100%;" /> 
                  <a href="javascript:void(0);"  class="btn btn-default btn-sm" id="inputOptions-bt1" >视图编辑</a>
                  <span class="text-warning">标准JSON字符，手动修改后需要进入视图保存</span>
                </div> 
              </div> 
              <div class="col-sm-12 hidden"> 
                <label class="form-lable">组件最终options
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="inputOptions2" name="inputOptions2" data-options="multiline:true,readonly:true,height:60,prompt:'无需直接修改，随配置JSON联动。JS中用的最终JSON'" style="width:100%;" /> 
                </div> 
                </div>
                <div class="col-sm-12 hidden"> 
                <label class="form-lable">组件options定义
                </label> 
                <div class="input-block"> 
                  <input class="easyui-textbox" id="inputOptions3" name="inputOptions3" data-options="multiline:true,height:60,readonly:true,prompt:'无需直接修改，随配置JSON联动。属性定义JSON'" style="width:100%;" /> 
                </div> 
                </div>
          </div>
        
          <div class="col-sm-12"> 
              <div class="row"> 
              <fieldset title="折叠/展开" onclick="accordionEntityToggle(this,'B','#entity-java-info')"> 
                  <legend class=" text-info">后台属性
                    <span class="accordion-collapse" style="font-size: 14px;">&nbsp;&nbsp;&nbsp;</span></legend> 
              </fieldset> 
              </div> 
          </div>
          <div class="col-sm-12" id="entity-java-info"> 
            <div class="col-sm-12"> 
              <label class="form-lable">引用表编码
              </label> 
              <div class="input-block"> 
                <select class="easyui-textbox" id="useTableCode" name="useTableCode" data-options="prompt:'要使用的表'" style="width:100%;" ></select>
              </div> 
            </div> 
            <div class="col-sm-12"> 
              <label class="form-lable">引用表SQL
              </label> 
              <div class="input-block"> 
                <select class="easyui-textbox" id="useTableSqlCode" name="useTableSqlCode" data-options="prompt:'要使用的表'" style="width:100%;" ></select>
              </div> 
            </div>
            <div class="col-sm-12"> 
              <label class="form-lable">是否标准类型
              </label> 
              <div class="input-block"> 
                <select class="easyui-combobox" id="standardFlag" name="standardFlag" data-options="required:true,panelHeight:70" style="width:100%;" ></select>
              </div> 
            </div> 
            <div class="col-sm-12"> 
              <label class="form-lable">JAVA类型
              </label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="javaType" name="javaType" data-options="" style="width:100%;" /> 
              </div> 
            </div> 
            <div class="col-sm-12"> 
              <label class="form-lable">JAVA类型(全)
              </label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="javaFullType" name="javaFullType" data-options="" style="width:100%;" /> 
              </div> 
            </div> 
            <div class="col-sm-12"> 
              <label class="form-lable">JAVA扩展类型
              </label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="javaVoType" name="javaVoType" data-options="" style="width:100%;" /> 
              </div> 
            </div>
            <div class="col-sm-12"> 
              <label class="form-lable">JDBC类型
              </label> 
              <div class="input-block"> 
                <input class="easyui-textbox" id="jdbcType" name="jdbcType" data-options="" style="width:100%;" /> 
              </div> 
            </div> 
          </div>
          <div class="col-sm-12"> 
                <div class="row"> 
                <fieldset title="折叠/展开" onclick="accordionEntityToggle(this,'B','#entity-check-info')"> 
                    <legend class=" text-info">校验属性
                      <span class="accordion-collapse" style="font-size: 14px;">&nbsp;&nbsp;&nbsp;</span></legend> 
                </fieldset> 
                </div> 
          </div> 
          <div class="col-sm-12" id="entity-check-info"> 
                <div class="col-sm-12"> 
                  <label class="form-lable">是否必填
                  </label> 
                  <div class="input-block"> 
                    <select class="easyui-combobox" id="mustFlag" name="mustFlag" data-options="required:true,panelHeight:70" style="width:100%;" ></select>
                  </div> 
                </div>
                <div class="col-sm-12"> 
                  <label class="form-lable">校验类型
                  </label> 
                  <div class="input-block"> 
                    <input class="easyui-combobox" id="checkType" name="checkType" data-options="required:true,panelHeight:70" style="width:100%;" /> 
                  </div> 
                </div>
                <div class="col-sm-12"> 
                  <label class="form-lable">校验规则(后台)
                  </label> 
                  <div class="input-block"> 
                    <input class="easyui-textbox" id="checkBackground" name="checkBackground" data-options="multiline:true" style="width:100%;" /> 
                  </div> 
                </div> 
                <div class="col-sm-12"> 
                  <label class="form-lable">校验规则(页面)
                  </label> 
                  <div class="input-block"> 
                    <input class="easyui-textbox" id="checkPage" name="checkPage" data-options="multiline:true" style="width:100%;" /> 
                  </div> 
                </div> 
                <div class="col-sm-12"> 
                  <label class="form-lable">最大值
                  </label> 
                  <div class="input-block"> 
                    <input class="easyui-textbox" id="maxVal" name="maxVal" data-options="" style="width:100%;" /> 
                  </div> 
                </div> 
                <div class="col-sm-12"> 
                  <label class="form-lable">最小值
                  </label> 
                  <div class="input-block"> 
                    <input class="easyui-textbox" id="minVal" name="minVal" data-options="" style="width:100%;" /> 
                  </div> 
                </div>
          </div>
     
       </div>
    </div>
  </form>
</div>


 <script>
  TableToggleFlag = true;//默认开启联动
  TableSelectFlag = null;//默认未选中
  ConfigCloseFlag = true;
  ConfigFirstFlag = true;
  ConfigTabSelectIdx = 0;
  DictNames = {};
  ccJSON ={};
  
  /* --分割------------------------------------------------------------------------------ */
  
  TitleLeft = "代码生成配置";
  IdDlgAddLeft = "#dlg-add-left";
  IdDlgEditLeft = "#dlg-edit-left";
  IdDlgQueryLeft = "#dlg-query-left";
  IdTableLeft = "#table-left";
  TableHeaderLeftMenu = null;
  
  /* --分割------------------------------------------------------------------------------ */
  
  TitleRight = "代码生成配置明细";
  IdDlgAddRight = "#dlg-add-right";
  IdDlgEditRight = "#dlg-edit-right";
  IdDlgQueryRight = "#dlg-query-right";
  IdTableRight = "#table-right";
  TableHeaderRightMenu = null;
  
  /* --分割------------------------------------------------------------------------------ */
  IdDlgRightOpen = null;
  IdDlgJeditor = "#dlg-jeditor";
  JsonJeditor = null;
  JsonReadonly = false;
  IdDlgConfig = "#dlg-config";
  IdTableConfigMain = "#table-config-main";
  IdTableConfigMethod = "#table-config-method";
  
  IdTableConfigTemplate = "#table-config-template";
  IdTableConfigTemplateShow = "#table-config-template-show";
  IdTableConfigTabs = "#dlg-config-tabs";
  IdDlgUsePath = "#dlg-use-path";
  IdTableConfigEdit = null;//编辑对象
  IdTableConfigEditIdx = null;//编辑索引
  ObjParamConfig1 = [];
  ObjParamConfig2 = [];
  ObjParamConfig3 = [];
  SelectTemplateMethod = [];//默认挂载模板
  SelectTemplateTable = [];//默认挂载模板
  
  MethodEntityCopyIdx = null;
  MethodEntityEditIndex = null;
  IdTreeMainMethod = "#tree-main-method";
  IdTableTreeMethodEntity = "#table-tree-method-entity";
  IdDlgSelectTableCols = "#dlg-select-table-cols";
  IdTableColumns = IdDlgSelectTableCols + " #table-colunms";
  IdTableColumnsTb = IdDlgSelectTableCols + " #table-colunms-toolbar";
  IdTableColumnsTbBt1 = IdTableColumnsTb + " #toolbar-bt1";
  IdTableColumnsTbBt2 = IdTableColumnsTb + " #toolbar-bt2";
  IdDlgSelectTableInfo = "#dlg-select-table-info";
  IdTableInfo = IdDlgSelectTableInfo + " #table-info";
  IdTableInfoTb = IdDlgSelectTableInfo + " #table-info-toolbar";
  IdTableInfoTbBt1 = IdTableInfoTb + " #toolbar-bt1";
  IdTableInfoTbBt2 = IdTableInfoTb + " #toolbar-bt2";
  
  IdDlgMethodEntityEdit = "#dlg-method-entity-edit";
  IdMethodEntityAttr = IdDlgMethodEntityEdit + " #entity-attr";
  IdMethodEntityAttrEx = IdDlgMethodEntityEdit + " #entity-attr-ex";
  IdMethodEntityAttrBt1 = IdDlgMethodEntityEdit + " #entity-attr-bt1";
  IdMethodEntityAttrBt2 = IdDlgMethodEntityEdit + " #entity-attr-bt2";
  IdMethodEntityAttrBt3 = IdDlgMethodEntityEdit + " #entity-attr-bt3";
  IdTreeMethodEntityAttr = IdDlgMethodEntityEdit + " #tree-entity-attr";
  IdMethodEntityAttrOther = IdDlgMethodEntityEdit + " #entity-attr-other";
  IdMethodEntityInputOptBt1 = IdDlgMethodEntityEdit + " #inputOptions-bt1";
  
  IdDlgMethodEntityViewEdit = "#dlg-method-entity-view-edit";
  IdMethodEntityViewAttr = IdDlgMethodEntityViewEdit + " #view-opr";
  IdMethodEntityViewInputOptBt1 = IdDlgMethodEntityViewEdit + " #inputOptions-bt1";
  
  IdDlgMethodEntityInputOpts = "#dlg-method-entity-input-opts";
  JeditorMethodEntityInputOpts = null;
  IdDlgMethodEntityJson1 = "#dlg-method-entity-json1";
  IdDlgMethodEntityJson2 = "#dlg-method-entity-json2";
  MethodCodeEditor1 = null;
  MethodCodeEditor2 = null;
  
  
  IdTableConfigTbl = "#table-config-tbl";
  IdTableTableEntity = "#table-table-entity";
  IdTableTableWhere= "#table-table-where";
  IdTableTableEntityTb = "#table-table-entity-toolbar";
  IdTableTableWhereTb = "#table-table-where-toolbar";
  IdTableTableDataTb = "#table-table-data-toolbar";
  IdTableTableEntityTbBt1 = IdTableTableEntityTb + " #toolbar-bt1";
  IdTableTableWhereTbBt1 = IdTableTableWhereTb + " #toolbar-bt1";
  IdTableTableDataTbBt1 = IdTableTableDataTb + " #toolbar-bt1";
  IdTableTableEntityTbBt2 = IdTableTableEntityTb + " #toolbar-bt2";
  IdTableTableWhereTbBt2 = IdTableTableWhereTb + " #toolbar-bt2";
  
  TableInfoEditIndex = null;
  TableCodeEditor1 = null;
  
  AutoTableCodes = null;
  AutoTemplateCfgGenerateDtlId=null;
  OuterConfigDict={};
  /* --分割------------------------------------------------------------------------------ */
  $(function(){
      loadDictToPage();//字典
      //注册CodeMirror自定义模式
      mybatisHandler(CodeMirror);
      mybatisHintHandler(CodeMirror)
      sqlqueryHandler(CodeMirror);
      sqlqueryHintHandler(CodeMirror);
      
      $('#table-toggle').switchbutton({
      checked:true,
      handleText:'明细',
      width:75,
      height:25,
      handleWidth:35,
      onChange:function(checked){
        if(checked){
          TableToggleFlag = true;
          $('#p-all').layout('expand','east');
        }else{
          TableToggleFlag = false;
          $('#p-all').layout('collapse','east');
        }
        $('#p-all .layout-expand.layout-expand-east').addClass('disabled');
      }
    });
    zUtil.areaSize();
    fieldHoverShow();
    /* --分割------------------------------------------------------------------------------ */
    
    var urlLeft = zGlobal["http"] + "/autocode/cfgGenerate/list";
    var buttonsIdxLeft = [0,3,4];
    var buttonsFuncLeft = [dlgAddLeft,dlgDelLeftCfgGenerate,dlgQueryLeft];
    var optionsLeft = {
            queryParams:{},
            url : urlLeft,
            idField: 'cfgGenerateId',
            sortName: 'createTm',
            sortOrder: 'desc',
            multiSort: true,
            columns:[[
                {field: 'cfgGenerateId', title: '生成配置主键ID', align: 'center', width: 100, hidden:true},
                {field: 'projectId', title: '所属项目', align: 'center', width: 150, formatter: function(value,rowData,rowIndex){return zUtil.dictConvertOfAutocode(value,"ZSELECT_PROJECT")}},
                {field: 'moduleId', title: '所属模块', align: 'center', width: 150, formatter: function(value,rowData,rowIndex){return zUtil.dictConvertOfAutocode(value,"ZSELECT_PROJECT_MODULE")}},
                {field: 'templateId', title: '模板', align: 'center', width: 150, formatter: function(value,rowData,rowIndex){return zUtil.dictConvertOfAutocode(value,"ZSELECT_TEMPLATE")}},
                {field: 'orderNum', title: '排序', align: 'center', width: 80},
                {field: 'dataStatus', title: '状态', align: 'center', width: 80, formatter: function(value,rowData,rowIndex){ return zUtil.dictConvertOfAutocode(value,"dict.dataStatus")}},
                {field: 'createName', title: '创建用户', align: 'center', width: 100},
                {field: 'createTm', title: '创建时间', align: 'center', width: 135,sortable: true},
                {field: ' ', title: ' ', align: 'center', width: 100},
            ]],
            frozenColumns:[[
//              {field:'', title:'', align:'center', checkbox:true},
             {field:'buttonArr', title:'操作', align:'center', width: 60, formatter:buttonsFormatterLeft},
             {field: 'cfgGenerateTitle', title: '标题', align: 'left',halign: 'center', width: 180},
            ]],
            onDblClickCell: function(rowIndex, field, value){
                if("buttonArr" != field){
                    dlgDtlLeft(rowIndex);
                }
            },
            onSelect: function(rowIndex, rowData){
              if(TableToggleFlag && rowData['cfgGenerateId'] != TableSelectFlag){
                TableSelectFlag = rowData['cfgGenerateId'];
                zUtil.formClear(IdDlgQueryRight + ' form');
                zUtil.val(IdDlgQueryRight + ' #cfgGenerateId',rowData['cfgGenerateId']);
                zUtil.readonly(IdDlgQueryRight + ' #cfgGenerateId');
                zUtil.tableQuery(IdTableRight,{
                  'cfgGenerateId': rowData['cfgGenerateId']
                },{url:urlRight});
              }
            },
            onHeaderContextMenu: function(e, field){
              TableHeaderLeftMenu = zUtil.tableHeaderMenu(e,TableHeaderLeftMenu,IdTableLeft);
            },
            onRowContextMenu: function(e, rowIndex, rowData){
              e.preventDefault();
              zUtil.tableSelected(IdTableLeft,rowIndex);
              if(rowData != null){
                 dlgEditLeft(rowData);
              }
            },
    };
    zUtil.tableInit(IdTableLeft,optionsLeft,buttonsIdxLeft,buttonsFuncLeft);
    
    
    /* --分割------------------------------------------------------------------------------ */
    var urlRight = zGlobal["http"] + "/autocode/cfgGenerateDtl/list";
    var buttonsIdxRight = [0,4];
    var buttonsFuncRight = [dlgAddRight,dlgQueryRight];
    var optionsRight = {
            queryParams:{},
            url : '',
            idField: 'cfgGenerateDtlId',
            sortName: 'orderNum,createTm',
            sortOrder: 'desc',
            multiSort: true,
//             singleSelect: false,
            selectOnCheck: false,//单击单选框不要选中
            checkOnSelect: false,
            columns:[[
                {field: 'cfgGenerateId', title: '生成配置主键ID', align: 'center', width: 100, hidden: true},
                {field: 'cfgGenerateDtlId', title: '生成配置明细主键ID', align: 'center', width: 100, hidden: true},
                {field: 'moduleKey', title: '模块编码', align: 'left',halign: 'center', width: 100},
                {field: 'outputModulePath', title: '模块路径', align: 'center', width: 100},
                {field: 'generateType', title: '生成类型', align: 'center', width: 80, formatter: function(value,rowData,rowIndex){return zUtil.dictConvertOfAutocode(value,"cfg.generateType")}},
                {field: 'orderNum', title: '排序', align: 'center', width: 60,sortable: true},
                {field: 'dataStatus', title: '状态', align: 'center', width: 60, formatter: function(value,rowData,rowIndex){ return zUtil.dictConvertOfAutocode(value,"dict.dataStatus")}},
                {field: 'createName', title: '创建用户', align: 'center', width: 100},
                {field: 'createTm', title: '创建时间', align: 'center', width: 135,sortable: true},
                {field: ' ', title: ' ', align: 'center', width: 100},
            ]],
            frozenColumns:[[
             {field:'', title:'', align:'center', checkbox:true},
             {field:'buttonArr', title:'操作', align:'center', width: 85, formatter:buttonsFormatterRight},
             {field: 'moduleKeyName', title: '模块名称', align: 'left',halign: 'center', width: 120},
            ]],
            onDblClickCell: function(rowIndex, field, value){
                if("buttonArr" != field){
                    dlgDtlRight(rowIndex);
                }
            },
            onSelect: function(rowIndex, rowData){
            },
            onHeaderContextMenu: function(e, field){
              TableHeaderRightMenu = zUtil.tableHeaderMenu(e,TableHeaderRightMenu,IdTableRight);
            },
            onRowContextMenu: function(e, rowIndex, rowData){
              e.preventDefault();
              zUtil.tableSelected(IdTableRight,rowIndex);
              if(rowData != null){
                  dlgEditRight(rowData);
              }
            },
            toolbar:[{
                iconCls: 'fa fa-eye',
                text:'联动代码生成',
                handler: function(){
                          dlgOnlineLookCode();
                      }
                }
           ]
    };
    zUtil.tableInit(IdTableRight,optionsRight,buttonsIdxRight,buttonsFuncRight);
    
        
        
    /* --分割------------------------------------------------------------------------------ */
    
    $('#table-config-template-show-btn').on('click',function(){
        var data = zUtil.formClear(IdTableConfigTemplateShow);
    });
    $('#table-config-template-show-btn2').on('click',function(){
        IdTableConfigEdit = IdTableConfigTemplate;
        var data = zUtil.valAll(IdTableConfigTemplateShow);
        var ndata = {};
        var outputBasePathVal = data['outputBasePath'];
        var outputFileNameVal = data['outputFileName'];
        var outputPathVal = data['outputPath'];
        var extendClazzVal = data['extendClazz'];
        var importFileVal = data['importFile'];
        var importClazzVal = data['importClazz'];
        var autowiredClazzVal = data['autowiredClazzVal'];
        if(outputBasePathVal != null){
          ndata['outputBasePath'] = (outputBasePathVal==="NAN")?null:outputBasePathVal;
        }
        if(outputFileNameVal != null){
          ndata['outputFileName'] = (outputFileNameVal==="NAN")?null:outputFileNameVal;
        }
        if(outputPathVal != null){
          ndata['outputPath'] = (outputPathVal==="NAN")?null:outputPathVal;
        }
        if(extendClazzVal != null){
          ndata['extendClazz'] = (extendClazzVal==="NAN")?null:extendClazzVal;
        }
        if(importFileVal != null){
          ndata['importFile'] = (importFileVal==="NAN")?null:importFileVal;
        }
        if(importClazzVal != null){
          ndata['importClazz'] = (importClazzVal==="NAN")?null:importClazzVal;
        }
        if(autowiredClazzVal != null){
            ndata['autowiredClazz'] = (autowiredClazzVal==="NAN")?null:autowiredClazzVal;
        }
        tableEditForUpdate(ndata);
    });
    zUtil.inputInit(IdTableConfigTemplateShow + ' #importClazz','input',{
        icons:[{
            iconCls:'icon-add',
            text:'快捷选择',
            handler: function(e){
                 showParamsList();
                 $('#dlg-use-path-tabs').tabs("select",2);
            }
        }
        ]
    });
    zUtil.inputInit(IdTableConfigTemplateShow + ' #extendClazz','input',{
        icons:[{
            iconCls:'icon-add',
            text:'快捷选择',
            handler: function(e){
                 showParamsList();
                 $('#dlg-use-path-tabs').tabs("select",2);
            }
        }
        ]
    });
    zUtil.inputInit(IdTableConfigTemplateShow + ' #outputPath','input',{
        icons:[{
            iconCls:'icon-add',
            text:'快捷选择',
            handler: function(e){
                 showParamsList();
                 $('#dlg-use-path-tabs').tabs("select",0);
            }
        }
        ]
    });
    zUtil.inputInit(IdTableConfigTemplateShow + ' #outputFileName','input',{
        icons:[{
            iconCls:'icon-add',
            text:'快捷选择',
            handler: function(e){
                 showParamsList();
                 $('#dlg-use-path-tabs').tabs("select",0);
            }
        }
        ]
    });
    $('#table-config-template-show-btn3').on('click',function(){
        showParamsList();
    });
    
    $(IdTableColumnsTbBt1).on('click',function(){
        tableColumnsQuery();
    });
    $(IdTableColumnsTbBt2).on('click',function(){
        tableColumnsClearSelect();
    });
    $(IdTableInfoTbBt1).on('click',function(){
        tableInfoQuery();
    });
    $(IdTableInfoTbBt2).on('click',function(){
        tableInfoClearSelect();
    });
    
    $(IdMethodEntityAttrBt1).on('click',function(){
        entityAttrEditClear("1");
    });
    $(IdMethodEntityAttrBt2).on('click',function(){
        entityAttrEditClear("2");
    });
    $(IdMethodEntityAttrBt3).on('click',function(){
        entityAttrEditSort();
    });
    $(IdMethodEntityInputOptBt1).on('click',function(){
        dlgEntityInputOpts("1");
    });
    $(IdMethodEntityViewInputOptBt1).on('click',function(){
        dlgEntityInputOpts("2");
    });
    
    $(IdTableTableDataTbBt1).on('click',function(){
        configForTableEntityAdd();
    });
    $(IdTableTableEntityTbBt1).on('click',function(){
        configForTableEntityAdd2('1');
    });
    $(IdTableTableWhereTbBt1).on('click',function(){
        configForTableEntityAdd2('2');
    });
    $(IdTableTableEntityTbBt2).on('click',function(){
        configForTableEntityDelAll('1');
    });
    $(IdTableTableWhereTbBt2).on('click',function(){
        configForTableEntityDelAll('2');
    });
    $('#table-table-rel-toolbar #toolbar-bt1').on('click',function(){
        configForTableRelAdd();
    });
    
    $(IdDlgMethodEntityViewEdit).on('click','[cpt-id]',function(e){
        var cptId = $(e.currentTarget).attr("cpt-id");
        if(cptId){
            var snode = zUtil.treegrid(IdTableTreeMethodEntity,"find",cptId);
            zUtil.readonlyAll(IdDlgMethodEntityViewEdit+ " #view-opr",false);
            zUtil.valAll(IdDlgMethodEntityViewEdit+ " #view-opr",snode);
            $(IdDlgMethodEntityViewEdit+ " #entity-base-info").focus();
            if($(IdDlgMethodEntityViewEdit+ " #entity-base-info").hasClass("hidden")){
                $(IdDlgMethodEntityViewEdit+ " #entity-base-info").prev().find("fieldset").click();
            }
            zUtil.val(IdDlgMethodEntityViewEdit + ' #uniqueId',snode['_uniqueId']);
            $(IdDlgMethodEntityViewEdit).find('.cpt-selected').removeClass('cpt-selected');
            $(e.currentTarget).addClass('cpt-selected');
        }
    });
    
    $("#dlg-config").on('mouseenter mouseleave','tr[class*="datagrid-row"]>td[field]',function(e){
        var div = $(this).find('div[class*="datagrid-cell"] span[class*="column-hidden-val"]');
        if(div){
           if(e.type == "mouseenter"){
              div.addClass("column-show-tip");
              calculateFloatingPosition(div,e);
           }else if(e.type == "mouseleave"){
              div.removeClass("column-show-tip");
           }
        }
    });
  });
  function calculateFloatingPosition(element, event) {
      var $element = $(element);
      var mouseX = event.clientX;
      var mouseY = event.clientY;
      var windowWidth = $(window).width();
      var windowHeight = $(window).height();
      var elementWidth = $element.outerWidth();
      var elementHeight = $element.outerHeight();
      var left, top;
      // 判断元素是否超出可视窗口的左界
      if (mouseX - elementWidth < 0) {
        left = mouseX;
      } else {
        left = mouseX - elementWidth;
      }
      // 判断元素是否超出可视窗口的右边界
      if (mouseX + elementWidth > windowWidth) {
        left = mouseX - elementWidth;
      }
      // 判断元素是否超出可视窗口的上边界
      if (mouseY - elementHeight < 0) {
        top = mouseY + 10;
      } else {
        top = mouseY - elementHeight - 10;
      }
      // 设置元素的位置
      $element.css({
        left: left,
        top: top
      });
    }
  
  function loadDictToPage(){
      var returnHandler = function(dict){
          zDictAutocode = dict;
          DictNames['ZSELECT_PROJECT'] = 'projectId';
          DictNames['ZSELECT_PROJECT_MODULE'] = 'moduleId';
          DictNames['ZSELECT_TEMPLATE'] = 'templateId';
          DictNames['ZSELECT_CFG_GENERATE'] = 'cfgGenerateId';
          DictNames['dict.dataStatus'] = 'dataStatus';
          DictNames['cfg.generateType'] = 'generateType';
          DictNames['ZSELECT_PREVIEW_TEMPLATE'] = 'cfgTemplateId';
          var linkSelsetIds = [IdDlgQueryLeft,IdDlgAddLeft,IdDlgEditLeft,IdDlgQueryRight,IdDlgAddRight,IdDlgEditRight,"#dlg-select-template-list"];
          $.each(linkSelsetIds,function(i,item){
              zUtil.selectFill(item,DictNames,zDictAutocode);
              
              zUtil.inputInit(item +" #projectId",'select',{
                  onSelect: function(data){
                      if(!data){return;}
                      zUtil.selectClear(item +" #moduleId");
                      DictNames = {};
                      DictNames["ZSELECT_PROJECT_MODULE_"+data["value"]] = "moduleId";
                      zUtil.selectFill(item, DictNames, zDictAutocode);
                  },
                  onChange: function(newValue,oldValue){
                      if(newValue){return;}
                      zUtil.val(item +" #moduleId", null);
                      DictNames = {};
                      DictNames["ZSELECT_PROJECT_MODULE"] = "moduleId";
                      zUtil.selectFill(item, DictNames, zDictAutocode);
                  }
              });
              
              zUtil.inputInit(item +" #moduleId",'select',{
                  onSelect: function(data){
                      if(!data){return;}
                      zUtil.val(item +" #projectId",data['projectId']);
                  }
              });
              
              zUtil.inputInit(item +" #templateId",'input',{
                  icons:[{
                      iconCls:'icon-add',
                      text:'模板选择',
                      handler: function(e){
                          dlgSelectTemplateList(item);
                      }
                  }]
              });
          });
      }
      zUtil.dictLoadOfAutocode("dict.dataStatus,template.outputType,dict.booleanFlag"
          + ",cfg.fieldType,validation.fieldType,cfg.useJavaClass,cfg.generateType,cfg.tableKeyType"
          +",cfg.sqlGenerateType,cfg.tableSqlType,cfg.fieldUseType,cfg.methodOprType,cfg.tableType"
          +",cfg.conditionSymbol,cfg.conditionSymbolType,cfg.availableMethodList,cfg.availableMapperSqlList"
          +",cfg.layoutType"
          +",ZSELECT_PROJECT,ZSELECT_PROJECT_MODULE,ZSELECT_TEMPLATE,ZSELECT_TEMPLATE_DTL,ZSELECT_CFG_GENERATE"
          +",ZSELECT_PREVIEW_TEMPLATE"
          ,null,returnHandler);
  }
  
  /* --分割------------------------------------------------------------------------------ */
  
  //TODO
  function buttonsFormatterLeft(value,rowData,rowIndex){
    return '<a href="javascript:void(0);" class="easyui-linkbutton" onclick="dlgDelLeft('+rowIndex+');" title="删除" ><i class="fa fa-trash"> </i></a>'
    +' <a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgAddLeft('+rowIndex+');" title="复制" ><i class="fa fa-files-o"> </i></a>';
  }
  //TODO
  function dlgQueryLeft(){
    var dlgSave = function(){
      var params = zUtil.valAll(IdDlgQueryLeft);
      zUtil.tableQuery(IdTableLeft,params);
      zUtil.tableData(IdTableRight,[]);
      zUtil.tableUnSelected(IdTableLeft);
      TableSelectFlag = null;
    };
    var dlgClear = function(){
      zUtil.formClear(IdDlgQueryLeft + ' form');
    };
    var dlgClose = function(){
      zUtil.dialogClose(IdDlgQueryLeft);
    };
    var dlgOptions = {
      title: TitleLeft + '-查询',
    };
    var dlgButtonsIdx = [0,1,2];
    var dlgButtonsFunc =  [dlgSave,dlgClear,dlgClose];
    zUtil.queryInit(IdDlgQueryLeft,dlgOptions,dlgButtonsIdx,dlgButtonsFunc);
    zUtil.dialogOpen(IdDlgQueryLeft);
  };
  //TODO
  function dlgQueryxLeft(){
    //zUtil.dialogOpen(IdDlgQueryxLeft);
  };
  //TODO
  function dlgAddLeft(row){
    zUtil.formClear(IdDlgAddLeft + ' form');
    zUtil.readonlyAll(IdDlgAddLeft,false);
    JsonReadonly = false;
    
    var dlgSave = function(){
      if(!zUtil.formCheck(IdDlgAddLeft +' form')){
        return false;
      };
      var params = zUtil.valAll(IdDlgAddLeft);
      var reqData = {reqData: params};
      zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerate/add", reqData
      ,function(result){
        if(zCode["GLOBAL_SUCCESS"] == zUtil.getVal(result,zConst["busCode"])){
          var params = zUtil.valAll(IdDlgQueryLeft);
          zUtil.tableQuery(IdTableLeft,params);
          zUtil.dialogClose(IdDlgAddLeft);
          JsonObjLeft = {};
          zUtil.dictLoadSyncOfAutocode("ZSELECT_PROJECT");
        }else{
          zUtil.msg('保存失败'+(result.busMsg?'. '+result.busMsg:''));
        }
      });
    };
    var dlgClose = function(){
      zUtil.dialogClose(IdDlgAddLeft);
      JsonObjLeft = {};
    };
    var dlgOptions = {
       title: TitleLeft + '-新增',
       onOpen : function(){
        if("number" === $.type(row)){
          zUtil.tableSelected(IdTableLeft,row);
          row = zUtil.tableRows(IdTableLeft);
          var params = {};
          params['cfgGenerateId']  = row['cfgGenerateId'];
          zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerate/detail", {reqData:params}
          ,function(result){
              if(zCode["GLOBAL_SUCCESS"] != zUtil.getVal(result,zConst["busCode"])){
                zUtil.msg('获取信息失败');
                return false;
              }
              zUtil.valAll(IdDlgAddLeft,result[zConst["resData"]]);
          });
       }
      }
    };
    var dlgButtonsIdx = [0,1];
    var dlgButtonsFunc =  [dlgSave,dlgClose];
    zUtil.dialogInit(IdDlgAddLeft,dlgOptions,dlgButtonsIdx,dlgButtonsFunc);   
    zUtil.dialogOpen(IdDlgAddLeft);
  };
  //TODO  
  function dlgEditLeft(row){
    if($.isNumeric(row)){
         zUtil.tableSelected(IdTableLeft,row);
         row = zUtil.tableRows(IdTableLeft);
    }
    
    zUtil.formClear(IdDlgEditLeft + ' form');
    zUtil.readonlyAll(IdDlgEditLeft,false);
    zUtil.readonly(IdDlgEditLeft + ' #cfgGenerateId');
    zUtil.readonly(IdDlgEditLeft + ' #projectId');
    zUtil.readonly(IdDlgEditLeft + ' #moduleId');
    zUtil.readonly(IdDlgEditLeft + ' #cfgGeneratePath');
    zUtil.readonly(IdDlgEditLeft + ' #dataStatus');
    zUtil.readonly(IdDlgEditLeft + ' #createOprid');
    zUtil.readonly(IdDlgEditLeft + ' #createName');
    zUtil.readonly(IdDlgEditLeft + ' #createTm');
    zUtil.readonly(IdDlgEditLeft + ' #lastUpdOprid');
    zUtil.readonly(IdDlgEditLeft + ' #lastUpdName');
    zUtil.readonly(IdDlgEditLeft + ' #lastUpdTm');
    JsonReadonly = false;
          
    var dlgSave = function(){
      if(!zUtil.formCheck(IdDlgEditLeft +' form')){
        return false;
      };
      var params = zUtil.valAll(IdDlgEditLeft);
      var reqData = {reqData: params};
      zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerate/edit", reqData
      ,function(result){
        if(zCode["GLOBAL_SUCCESS"] == zUtil.getVal(result,zConst["busCode"])){
          var params = zUtil.valAll(IdDlgQueryLeft);
          zUtil.tableQuery(IdTableLeft,params);
          zUtil.dialogClose(IdDlgEditLeft);
          zUtil.dictLoadSyncOfAutocode("ZSELECT_PROJECT");
        }else{
          zUtil.msg('保存失败'+(result.busMsg?'. '+result.busMsg:''));
        }
      });
      
    };
    var dlgClose = function(){
      zUtil.dialogClose(IdDlgEditLeft);
    };
    var dlgOptions = {
      title: TitleLeft + '-编辑',
      onOpen : function(){
        var params = {};
        params['cfgGenerateId']  = row['cfgGenerateId'];
        zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerate/detail", {reqData:params}
        ,function(result){
            if(zCode["GLOBAL_SUCCESS"] != zUtil.getVal(result,zConst["busCode"])){
              zUtil.msg('获取信息失败');
              return false;
            }
            zUtil.valAll(IdDlgEditLeft,result[zConst["resData"]]);
        });
      }
    };
    var dlgButtonsIdx = [0,1];
    var dlgButtonsFunc =  [dlgSave,dlgClose];
    zUtil.dialogInit(IdDlgEditLeft,dlgOptions,dlgButtonsIdx,dlgButtonsFunc);
    zUtil.dialogOpen(IdDlgEditLeft);
  };
  //TODO
  function dlgDtlLeft(row){
    if($.isNumeric(row)){
        zUtil.tableSelected(IdTableLeft,row);
        row = zUtil.tableRows(IdTableLeft);
    }
    zUtil.formClear(IdDlgEditLeft + ' form');
    zUtil.readonlyAll(IdDlgEditLeft);
    JsonReadonly = true;
          
    var dlgClose = function(){
      zUtil.dialogClose(IdDlgEditLeft);
    };
    var dlgOptions = {
      title: TitleLeft + '-详情',
      onOpen : function(){
        var params = {};
        params['cfgGenerateId']  = row['cfgGenerateId'];
        zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerate/detail", {reqData:params}
        ,function(result){
            if(zCode["GLOBAL_SUCCESS"] != zUtil.getVal(result,zConst["busCode"])){
              zUtil.msg('获取信息失败');
              return false;
            }
            zUtil.valAll(IdDlgEditLeft,result[zConst["resData"]]);
        });
      }
    };
    var dlgButtonsIdx = [1];
    var dlgButtonsFunc =  [dlgClose];
    zUtil.dialogInit(IdDlgEditLeft,dlgOptions,dlgButtonsIdx,dlgButtonsFunc);
    zUtil.dialogOpen(IdDlgEditLeft);
  };
  //TODO
  function dlgDelLeft(row){
    if($.isNumeric(row)){
        zUtil.tableSelected(IdTableLeft,row);
        row = zUtil.tableRows(IdTableLeft);
    }
    
    var params = {}; 
    params['cfgGenerateId']  = row['cfgGenerateId'];
    var reqData = {reqData: params};
    var okfunc = function(){
      zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerate/del", reqData
      ,function(result){
        if(zCode["GLOBAL_SUCCESS"] == zUtil.getVal(result,zConst["busCode"])){
          var params = zUtil.valAll(IdDlgQueryLeft);
          zUtil.tableQuery(IdTableLeft,params);
          zUtil.dictLoadSyncOfAutocode("ZSELECT_PROJECT");
        }else{
          zUtil.msg('操作失败'+(result.busMsg?'. '+result.busMsg:''));
        }
      });
    };
    zUtil.msgConfirm("确认删除已选中记录?",okfunc);
  };
  //TODO 
  function dlgDelLeftCfgGenerate(){
    var row = zUtil.tableRows(IdTableLeft);
    if(!row){
        zUtil.msg('请先选择记录');
        return false;
    }
    var params = {}; 
    params['cfgGenerateId']  = row['cfgGenerateId'];
    var reqData = {reqData: params};
    var okfunc = function(){
      zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerate/delCfgGenerateAndDetail", reqData
      ,function(result){
        if(zCode["GLOBAL_SUCCESS"] == zUtil.getVal(result,zConst["busCode"])){
          var params = zUtil.valAll(IdDlgQueryLeft);
          zUtil.tableQuery(IdTableLeft,params);
          zUtil.tableData(IdTableRight,[]);
        }else{
          zUtil.msg('操作失败');
        }
      });
    }
    zUtil.msgConfirm("删除代码配置及明细?",okfunc);
  };
  /* --分割------------------------------------------------------------------------------ */
  //TODO
  function getTableLeft(){
      var rowLeft =  zUtil.tableRows(IdTableLeft);
      if(rowLeft == null || rowLeft.length == 0){
          zUtil.msg('未选择左侧数据');
          return null;
      }
      return rowLeft;
  }
  //TODO
  function buttonsFormatterRight(value,rowData,rowIndex){
    return '<a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgDelRight('+rowIndex+');" title="删除" ><i class="fa fa-trash"> </i></a>'
         +' <a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgAddRight('+rowIndex+');" title="复制" ><i class="fa fa-files-o"> </i></a>'
         +' <a href="javascript:void(0)" class="easyui-linkbutton" onclick="dlgOnlineLookCode('+rowIndex+');" title="代码生成" ><i class="fa fa-eye"> </i></a>'
         +' <a href="javascript:void(0)" class="easyui-linkbutton" onclick="doGeneratorDowload('+rowIndex+');" title="ZIP下载" ><i class="fa fa-cloud-download"> </i></a>';
  }
  //TODO
  function dlgQueryRight(){
    var rowLeft = getTableLeft();
    if(rowLeft == null){
      return false;
    };
    zUtil.readonly(IdDlgQueryRight + ' #cfgGenerateId');
    
    var dlgSave = function(){
      var params = zUtil.valAll(IdDlgQueryRight);
      zUtil.tableQuery(IdTableRight,params);
    };
    var dlgClear = function(){
      zUtil.formClear(IdDlgQueryRight + ' form');
      zUtil.val(IdDlgQueryRight + ' #cfgGenerateId',rowLeft['cfgGenerateId']);
    };
    var dlgClose = function(){
      zUtil.dialogClose(IdDlgQueryRight);
    };
    var dlgOptions = {
      title: TitleRight + '-查询',
    };
    var dlgButtonsIdx = [0,1,2];
    var dlgButtonsFunc =  [dlgSave,dlgClear,dlgClose];
    zUtil.queryInit(IdDlgQueryRight,dlgOptions,dlgButtonsIdx,dlgButtonsFunc);
    zUtil.dialogOpen(IdDlgQueryRight);
  };
  //TODO
  function dlgQueryxRight(){
    //zUtil.dialogOpen(IdDlgQueryxRight);
  };
  //TODO
  function dlgAddRight(row){
    var rowLeft = getTableLeft();
    if(rowLeft == null){
      return false;
    };
    AutoTableCodes=null;
    AutoTemplateCfgGenerateDtlId=null;
    zUtil.formClear(IdDlgAddRight + ' form');
    zUtil.readonlyAll(IdDlgAddRight,false);
    zUtil.val(IdDlgAddRight + ' #cfgGenerateId',rowLeft['cfgGenerateId']);
    zUtil.val(IdDlgAddRight + ' #attrExtendModule',rowLeft['attrExtendModule']);
    zUtil.val(IdDlgAddRight + ' #attrExtendField',rowLeft['attrExtendField']);
    zUtil.val(IdDlgAddRight + ' #generateType',"1");
    zUtil.readonly(IdDlgAddRight + ' #cfgGenerateDtlId');
    JsonReadonly = false;
    loadGridForTemplateDtl(IdDlgAddRight + " #excludeTemplateIds", rowLeft['templateId']);
    dlgRightSelectTable(IdDlgAddRight,rowLeft);
    ConfigTabSelectIdx = 0;
    
    var dlgSave = function(){
      if(!zUtil.formCheck(IdDlgAddRight +' form')){
        return false;
      };
      var params = zUtil.valAll(IdDlgAddRight);
      var reqData = {reqData: params};
      
      zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerateDtl/add", reqData
      ,function(result){
        if(zCode["GLOBAL_SUCCESS"] == zUtil.getVal(result,zConst["busCode"])){
          var params = zUtil.valAll(IdDlgQueryRight);
          zUtil.tableQuery(IdTableRight,params);
          if(ConfigCloseFlag){
              zUtil.dialogClose(IdDlgAddRight);
          }
        }else{
          zUtil.msg('保存失败'+(result.busMsg?'. '+result.busMsg:''));
        }
        ConfigCloseFlag = true;
      });
    };
    var dlgClose = function(){
      zUtil.dialogClose(IdDlgAddRight);
    };
    var dlgOptions = {
       title: TitleRight + '-新增',
       buttons:  [{
           text:'保存不关闭',
           handler: function(){
               ConfigCloseFlag = false;
               dlgSave();
           }
       }],
       onOpen : function(){
        if("number" === $.type(row)){
            zUtil.tableUnSelected(IdTableRight);
            zUtil.tableSelected(IdTableRight,row);
            row = zUtil.tableRows(IdTableRight);
            
            var params = {};
            params['cfgGenerateDtlId']  = row['cfgGenerateDtlId'];
            zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerateDtl/detail", {reqData:params}
            ,function(result){
                if(zCode["GLOBAL_SUCCESS"] != zUtil.getVal(result,zConst["busCode"])){
                  zUtil.msg('获取信息失败');
                  return false;
                }
                zUtil.valAll(IdDlgAddRight,result[zConst["resData"]]);
                zUtil.readonly(IdDlgAddRight + ' #cfgGenerateId',false);
            });
        }
      }
    };
    var dlgButtonsIdx = [0,1];
    var dlgButtonsFunc =  [dlgSave,dlgClose];
    zUtil.dialogInit(IdDlgAddRight,dlgOptions,dlgButtonsIdx,dlgButtonsFunc);   
    zUtil.dialogOpen(IdDlgAddRight);
  };
  //TODO  
  function dlgEditRight(row){
    var rowLeft = getTableLeft();
    if(rowLeft == null){
      return false;
    };
    AutoTableCodes=null;
    AutoTemplateCfgGenerateDtlId=null;
    loadGridForTemplateDtl(IdDlgEditRight + " #excludeTemplateIds", rowLeft['templateId']);
    ConfigTabSelectIdx = 0;
    
    if($.isNumeric(row)){
        zUtil.tableSelected(IdTableRight,row);
        row = zUtil.tableRows(IdTableRight);
    }
    zUtil.formClear(IdDlgEditRight + ' form');
    zUtil.readonlyAll(IdDlgEditRight,false);
//     zUtil.readonly(IdDlgEditRight + ' #cfgGenerateId');
    zUtil.readonly(IdDlgEditRight + ' #cfgGenerateDtlId');
    zUtil.readonly(IdDlgEditRight + ' #dataStatus');
    zUtil.readonly(IdDlgEditRight + ' #createOprid');
    zUtil.readonly(IdDlgEditRight + ' #createName');
    zUtil.readonly(IdDlgEditRight + ' #createTm');
    zUtil.readonly(IdDlgEditRight + ' #lastUpdOprid');
    zUtil.readonly(IdDlgEditRight + ' #lastUpdName');
    zUtil.readonly(IdDlgEditRight + ' #lastUpdTm');
    JsonReadonly = false;
    
    var dlgSave = function(){
      if(!zUtil.formCheck(IdDlgEditRight +' form')){
        return false;
      };
      var params = zUtil.valAll(IdDlgEditRight);
      var reqData = {reqData: params};
      zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerateDtl/edit", reqData
      ,function(result){
        if(zCode["GLOBAL_SUCCESS"] == zUtil.getVal(result,zConst["busCode"])){
          var params = zUtil.valAll(IdDlgQueryRight);
          zUtil.tableQuery(IdTableRight,params);
          if(ConfigCloseFlag){
              zUtil.dialogClose(IdDlgEditRight);
          }
        }else{
          zUtil.msg('保存失败'+(result.busMsg?'. '+result.busMsg:''));
        }
        ConfigCloseFlag = true;
      });
    };
    var dlgClose = function(){
      zUtil.dialogClose(IdDlgEditRight);
    };
    var dlgOptions = {
      title: TitleRight + '-编辑',
      buttons:  [{
          text:'保存不关闭',
          handler: function(){
              ConfigCloseFlag = false;
              dlgSave();
          }
      }],
      onOpen : function(){
        var params = {};
        params['cfgGenerateDtlId']  = row['cfgGenerateDtlId'];
        zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerateDtl/detail", {reqData:params}
        ,function(result){
            if(zCode["GLOBAL_SUCCESS"] != zUtil.getVal(result,zConst["busCode"])){
              zUtil.msg('获取信息失败');
              return false;
            }
            zUtil.valAll(IdDlgEditRight,result[zConst["resData"]]);
        });
      }
    };
    var dlgButtonsIdx = [0,1];
    var dlgButtonsFunc =  [dlgSave,dlgClose];
    zUtil.dialogInit(IdDlgEditRight,dlgOptions,dlgButtonsIdx,dlgButtonsFunc);
    zUtil.dialogOpen(IdDlgEditRight);
  };
  //TODO
  function dlgDtlRight(row){
    var rowLeft = getTableLeft();
    if(rowLeft == null){
      return false;
    };
    if($.isNumeric(row)){
        zUtil.tableSelected(IdTableRight,row);
        row = zUtil.tableRows(IdTableRight);
    }
    zUtil.formClear(IdDlgEditRight + ' form');
    zUtil.readonlyAll(IdDlgEditRight);
    JsonReadonly = true;
    loadGridForTemplateDtl(IdDlgEditRight + " #excludeTemplateIds", rowLeft['templateId']);
    ConfigTabSelectIdx = 0;
    
    var dlgClose = function(){
      zUtil.dialogClose(IdDlgEditRight);
    };
    var dlgOptions = {
      title: TitleRight + '-详情',
      onOpen : function(){
        var params = {};
        params['cfgGenerateDtlId']  = row['cfgGenerateDtlId'];
        zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerateDtl/detail", {reqData:params}
        ,function(result){
            if(zCode["GLOBAL_SUCCESS"] != zUtil.getVal(result,zConst["busCode"])){
              zUtil.msg('获取信息失败');
              return false;
            }
            zUtil.valAll(IdDlgEditRight,result[zConst["resData"]]);
        });
      }
    };
    var dlgButtonsIdx = [1];
    var dlgButtonsFunc =  [dlgClose];
    zUtil.dialogInit(IdDlgEditRight,dlgOptions,dlgButtonsIdx,dlgButtonsFunc);
    zUtil.dialogOpen(IdDlgEditRight);
  };
  //TODO
  function dlgDelRight(row){
    if($.isNumeric(row)){
        zUtil.tableSelected(IdTableRight,row);
        row = zUtil.tableRows(IdTableRight);
    }
    
    var params = {}; 
    params['cfgGenerateDtlId']  = row['cfgGenerateDtlId'];
    var reqData = {reqData: params};
    var okfunc = function(){
      zUtil.ajaxPost(zGlobal["http"] + "/autocode/cfgGenerateDtl/del", reqData
      ,function(result){
        if(zCode["GLOBAL_SUCCESS"] == zUtil.getVal(result,zConst["busCode"])){
          var params = zUtil.valAll(IdDlgQueryRight);
          zUtil.tableQuery(IdTableRight,params);
        }else{
          zUtil.msg('操作失败'+(result.busMsg?'. '+result.busMsg:''));
        }
      });
    }
    zUtil.msgConfirm("确认删除已选中记录?",okfunc);
  };
  
  function dlgOnlineLookCode(row){
      if($.isNumeric(row)){
          zUtil.tableSelected(IdTableRight,row);
          row = zUtil.tableRows(IdTableRight);
      }
      
      var params ={};
      var cfgGenerateDtlIds = [];
      if('undefined' !== $.type(row)){
          params['cfgGenerateId'] = row['cfgGenerateId'];
          cfgGenerateDtlIds.push(row['cfgGenerateDtlId']);
      }else{
          var templateDtlRows = zUtil.tableCheckRows(IdTableRight);
          if(templateDtlRows==null || templateDtlRows.length==0){
              zUtil.msg("至少勾选一条配置数据");
              return false;
          }
          
          var hasKeys = {};
          var flag = true;
          $.each(templateDtlRows,function(i,item){
              params['cfgGenerateId'] = item['cfgGenerateId'];
              cfgGenerateDtlIds.push(item['cfgGenerateDtlId']);
              if(hasKeys[item['moduleKey']]){
                  flag = false;
                  return false;
              }
              hasKeys[item['moduleKey']] ="Y";
          });
          if(!flag){
              zUtil.msg("不能选择相同模块编码");
              return;
          }
      }
      params['cfgGenerateDtlIds'] = cfgGenerateDtlIds;
      var reqData = {reqData: params};
      zUtil.ajaxPost(zGlobal["http"] + "/autocode/generator", reqData
      ,function(result){
        if(zCode["GLOBAL_SUCCESS"] != zUtil.getVal(result,zConst["busCode"])){
          if(zUtil.getVal(result,resData.sameFlag)=="1"){
              zUtil.msg('生成失败,模块编码相同不能同时生成');
              return false;
          }
          zUtil.msg('生成失败'+(result.busMsg?'. '+result.busMsg:''));
          return false;
        }
          result=result.resData;
          
          var okfunc = function(){
                var JSInfoDlgEditor = null;
              
                var dlgClose = function(){
                  zUtil.dialogClose('#dlg-code-online-look');
                };
               
                var dlgOptions = {
                   title: '代码预览',
                   onClose:function(){
                       JSInfoDlgEditor.toTextArea();
                   },
                   onOpen:function(){
                       JSInfoDlgEditor = CodeMirror.fromTextArea($('#dlg-code-online-look #fileContent')[0], {
                           autoRefresh:true,
                           lineNumbers: true,
                           styleActiveLine: true,
                           matchBrackets: true,
                           lineWrapping: true,
                           theme: 'dracula'
                      });
                      JSInfoDlgEditor.setSize('100%','100%');
                      JSInfoDlgEditor.on('keypress', () => {
                          //编译器内容更改事件
                          JSInfoDlgEditor.showHint();
                      });
                      JSInfoDlgEditor.setValue(" ");
                
                    var filelist = result.fileList;
                    var zNodes = [];
                    for(var i=0;i<filelist.length;i++){
                        var node = filelist[i];
                        var newNode = {
                                id: node.id
                                ,pId: node.parentId
                                ,name: node.fileName
                                ,fileInfo: node
                                ,chkDisabled: true
                                ,nocheck: true
                        };
                        if(node.type === "0"){
                            newNode.open = true;
                        }
                        if(node.type !== "2"){
                            newNode.isParent = true;
                        }
                        zNodes.push(newNode);
                    }
                    var setting = {
                            check: {
                                enable: true
                              ,chkDisabledInherit: false
                            },
                            data: {
                                simpleData: {
                                    enable: true
                                },
                                keep: {
                                    parent: true
                                },
                            },
                            view: {
                                nameIsHTML: true,
                                addDiyDom: function(treeId, treeNode) {
                                    var diyObj = $('<div class="ztree-btn-group"><button class="btn btn-info ztree-opr-btn" onclick="doZtreeExpandNode(\''+treeId+'\',\''+treeNode.tId+'\');">+</button></div>');
                                    if(treeNode.level === 1){
                                        $('#'+treeNode.tId+'_a').append(diyObj);
                                    }
                                },
                            },
                            callback: {
                                onClick : function(event, treeId, treeNode){
                                    var znode = $.extend(true,{},treeNode);
                                    var zattr = znode.fileInfo;
                                    var tval = zattr['fileContent'];
                                    var ext = zattr['fileName'].toLowerCase();
                                    var mode = "text/x-java";
                                    if(zattr['type']!=="2"){
                                        tval = " ";
                                    }
                                    var extList=["css--text/css","sass--text/x-sass","js--text/javascript","ts--text/typescript"
                                       ,"vue--text/x-vue","html-htmlmixed"
                                       ,"py--text/x-python","go--text/x-go","jav--text/x-java","yml--text/x-yaml"
                                        ,"xml--text/xml","json--application/json","sql--text/x-pgsql"];
                                    if(tval && tval.indexOf("FTL stack trace")>-1){
                                        mode = "text/x-java";
                                    } else if(ext.indexOf('.xml')>-1 && tval && tval.indexOf("mybatis")>-1 &&  tval.indexOf("mapper")>-1){
                                        mode = "text/x-mybatis";
                                        JSInfoDlgEditor.setOption("sqlMode", "text/x-pgsql");
                                    } else {
                                        $.each(extList,function(i,item){
                                             var arrs = item.split("--");
                                             if(ext.indexOf(arrs[0])>-1){
                                                 mode = arrs.length>1?arrs[1]:arrs[0];
                                             }
                                        });
                                    }
                                    console.log(ext, mode);
                                    
                                    JSInfoDlgEditor.setOption("mode", mode);
                                    JSInfoDlgEditor.setValue(tval);
                                }
                            }
                  };
                  
                  //树形结构初始化
                  codeFileTree  =  zUtil.zTreeInit("#tree-code-file", setting, zNodes);

                   }
                };

                var dlgButtonsIdx = [1];
                var dlgButtonsFunc =  [dlgClose];
                zUtil.dialogInit('#dlg-code-online-look',dlgOptions,dlgButtonsIdx,dlgButtonsFunc);   
                zUtil.dialogOpen('#dlg-code-online-look');
          };
          zUtil.msgConfirm('完成耗时'+result.useTime+',是否预览?',okfunc);
      });
  }
  function doZtreeExpandNode(treeId,tId){
       var zTreeObj = zUtil.zTreeObj(treeId);
       zTreeObj.expandNode(zTreeObj.getNodeByTId(tId), null, true);
  }
  
  function doGeneratorDowload(row){
      if($.isNumeric(row)){
          zUtil.tableSelected(IdTableRight,row);
          row = zUtil.tableRows(IdTableRight);
      }
      
      var okfunc = function(){
          var cfgGenerateDtlIds = [];
          var cfgGenerateId =null;
          if('undefined' !== $.type(row)){
              cfgGenerateId = row['cfgGenerateId'];
              cfgGenerateDtlIds.push("cfgGenerateDtlIds="+row['cfgGenerateDtlId']);
          }else{
              var templateDtlRows = zUtil.tableCheckRows(IdTableRight);
              if(templateDtlRows==null || templateDtlRows.length==0){
                  zUtil.msg("至少勾选一条配置数据");
                  return false;
              }
              
              $.each(templateDtlRows,function(i,item){
                  cfgGenerateId = item['cfgGenerateId'];
                  cfgGenerateDtlIds.push("cfgGenerateDtlIds="+item['cfgGenerateDtlId']);
              });
          }
          var token = zConst['token'] + "=" +getToken();
          window.open(zGlobal["http"] + "/autocode/generatorDownload?cfgGenerateId=" + cfgGenerateId
                      +"&"+cfgGenerateDtlIds.join("&")+"&"+token);
      };
      zUtil.msgConfirm('下载之前先生成，否则下载上一次已生成的文件',okfunc);
  }
  
  /* --分割------------------------------------------------------------------------------ */
function dlgSelectTemplateList(el){
    zUtil.dialogInit('#dlg-select-template-list'
              , {
                  title: "模板选择",
                  width: 650,
                  height: 450,
                  draggable: true,
                  onOpen:function(){
                      zUtil.tableInit2('#table-select-template-list',{
                          sortName: 'createTm',
                          sortOrder: 'desc',
                          toolbar:'#table-select-template-list-toolbar',
                          url: zGlobal["http"] + "/autocode/template/list",
                          queryParams:{},
                          columns:[[
                              {field: 'templateId', title: '模板主键ID', align: 'center', width: 100, hidden: true},
                              {field: 'projectId', title: '所属项目', align: 'left',halign: 'center', width: 100,sortable: true, formatter: function(value,rowData,rowIndex){ return zUtil.dictConvertOfAutocode(value,"ZSELECT_PROJECT")}},
                              {field: 'moduleId', title: '所属模块', align: 'left',halign: 'center', width: 100, formatter: function(value,rowData,rowIndex){ return zUtil.dictConvertOfAutocode(value,"ZSELECT_PROJECT_MODULE")}},
                              {field: 'orderNum', title: '排序', align: 'center', width: 50,sortable: true},
                              {field: 'dataStatus', title: '状态', align: 'center', width: 50, formatter: function(value,rowData,rowIndex){ return zUtil.dictConvertOfAutocode(value,"dict.dataStatus")}},
                              {field: 'createName', title: '创建用户', align: 'center', width: 100},
                              {field: 'createTm', title: '创建时间', align: 'center', width: 135,sortable: true},
                              {field: ' ', title: ' ', align: 'center', width: 100},
                          ]],
                          frozenColumns:[[
                              {field: 'templateTitle', title: '模板标题', align: 'left',halign: 'center', width: 160},
                          ]],
                          onSelect: function(index, row){
                              if(row && row['templateId']){
                                  zUtil.val(el + ' #templateId',row['templateId']);
                              }
                          },
                    });
                  }
                }
              , [1]
              , [function(){
                    zUtil.dialogClose('#dlg-select-template-list');
                }]
                ,true
     );
}
function dlgSelectTemplateListRefresh(){
    var params = zUtil.valAll('#table-select-template-list-toolbar');
    zUtil.tableUnSelected('#table-select-template-list');
    zUtil.tableQuery('#table-select-template-list',params);
}

function dlgRightSelectTable(el,rowLeft){
    zUtil.inputInit(el + ' #moduleKeyName','input',{
        buttonText:'选择表',
        onClickButton:function(){
            if(!zUtil.val(el + ' #outputModulePath')){
                zUtil.Toastr("warn","先填写模块路径");
                return;
            }
            AutoTemplateCfgGenerateDtlId=zUtil.val(el + ' #cfgGenerateDtlId');
            zUtil.dialogInit('#dlg-select-table-info'
                    , {
                        title: "选择表",
                        onOpen:function(){
                           var options = {
                                    queryParams:{projectId: rowLeft['projectId']},
                                    url : zGlobal["http"] + "/autocode/table/columnlist",
                                    idField: 'tableCode',
                                    sortName: 'orderNum',
                                    toolbar: IdTableInfoTb,
                                    singleSelect: false,
                                    columns:[[
                                        {field: 'projectId', title: '所属项目', align: 'center', width: 150, formatter: function(value,rowData,rowIndex){ return zUtil.dictConvertOfAutocode(value,"ZSELECT_PROJECT")}},
                                        {field: 'tableTag', title: '标签', align: 'center', width: 180},
                                        {field: 'tableCode', title: '表编码', align: 'center', width: 200},
//                                        {field: 'tableName', title: '原表编码', align: 'center', width: 200},
                                        {field: 'tableAlias', title: '表别名', align: 'center', width: 60},
                                        {field: 'tableJavaCode', title: '驼峰编码1', align: 'center', width: 100 },
                                        {field: 'tableJavaFullCode', title: '驼峰编码2', align: 'center', width: 100 },
                                        {field: 'orderNum', title: '排序', align: 'center', width: 50},
                                        {field: 'dataStatus', title: '状态', align: 'center', width: 50, formatter: function(value,rowData,rowIndex){ return zUtil.dictConvertOfAutocode(value,"dict.dataStatus")}},
                                        {field: ' ', title: ' ', align: 'center', width: 30},
                                    ]],
                                    frozenColumns:[[
                                       {field:'', title:'', align:'center', checkbox:true},
                                       {field: 'tableTitle', title: '标题', align: 'center', width: 150},
                                    ]],
                            };
                            zUtil.tableInit(IdTableInfo,options);
                            zUtil.tableUnSelected(IdTableInfo);
                        }
                      }
                    , [0,1]
                    , [function(){
                        var srows = zUtil.tableRows(IdTableInfo);
                        if(srows && srows.length>0){
                            AutoTableCodes=srows;
                            var codes =[];
                            var titles =[];
                            $.each(srows,function(i,item){
                                codes.push(item['tableJavaCode']);
                                titles.push(item['tableTitle']);
                            });
                            zUtil.val(el + ' #moduleKey',codes);
                            zUtil.val(el + ' #moduleKeyName',titles);
                            zUtil.Toastr("info","开始初始化信息！！！",null,{positionClass:"toast-top-center",timeOut: "5000"});
                            setTimeout(function(){
                                 zUtil.Toastr("info","初始化基础定义...",null,{positionClass:"toast-top-center"});
                                 $(el + ' #configContent_btnJeditor').click();
                                 setTimeout(function(){
                                     $(IdDlgJeditor).parent().find('#z-dialog-save').click();
                                     setTimeout(function(){
                                         $(el + ' #configContent_btnConfig').click();
                                     },100);
                                 },100);
                            },200);
                        }
                        zUtil.dialogClose('#dlg-select-table-info');
                      },function(){
                          zUtil.dialogClose('#dlg-select-table-info');
                      }]
                      ,true
           );
        },
    });
}
  </script>
</body>
</html>